<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Ability to modify documentation defaults]]></title><description><![CDATA[<p dir="auto">Hello team,</p>
<p dir="auto">I'd love to know if it were possible to edit the default structure/code samples in the documentation, or the way they are generated.</p>
<p dir="auto">For example, for a request like this:</p>
<pre><code>var settings = {
    "url": "https://my.server/api/endpoint",
    "data": {
        "token" : "abcde",
        "videoID" : "o2in43ntek",
        "uniqueUsersOnly" : "0",
        "company" : "2"
    },
    "method": "POST",
    "async": true,
    "crossDomain": true,
    "processData": true
};
$.ajax(settings).done(function (response) {
    console.log(response); // TODO: Do something with the result
});
</code></pre>
<p dir="auto">I would like to add:</p>
<pre><code>json: true
</code></pre>
<p dir="auto">To the list of parameters so that the response is automatically treated / parsed as JSON.</p>
<p dir="auto">It's a small example <img src="https://community.appdrag.com/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=lfk1vimvd74" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" title=":-)" alt="🙂" /></p>
]]></description><link>https://community.appdrag.com/topic/230/ability-to-modify-documentation-defaults</link><generator>RSS for Node</generator><lastBuildDate>Thu, 14 May 2026 14:20:04 GMT</lastBuildDate><atom:link href="https://community.appdrag.com/topic/230.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 14 Jul 2020 12:40:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Ability to modify documentation defaults on Wed, 15 Jul 2020 14:53:39 GMT]]></title><description><![CDATA[<p dir="auto">Whoops, sorry. I meant</p>
<pre><code>dataType: "json"
</code></pre>
<p dir="auto">Yes, you could add "response = JSON.parse(response)", for example. But, if you add "json" : "true" to the parameters, jQuery's ajax function will automatically parse it for you <img src="https://community.appdrag.com/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=lfk1vimvd74" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" title=":)" alt="🙂" /></p>
<p dir="auto">From jQuery's docs:<br />
<a href="https://api.jquery.com/jquery.ajax" rel="nofollow ugc">https://api.jquery.com/jquery.ajax</a> (search 'dataType')</p>
<p dir="auto">I'd also prefer to add default error handling logic, for example... so, adding a</p>
<pre><code>.catch(function (error) {
      myErrorReportingFunction(error);
}
</code></pre>
<p dir="auto">That, for example, would be very, very helpful.</p>
]]></description><link>https://community.appdrag.com/post/797</link><guid isPermaLink="true">https://community.appdrag.com/post/797</guid><dc:creator><![CDATA[Daniel Mulroy]]></dc:creator><pubDate>Wed, 15 Jul 2020 14:53:39 GMT</pubDate></item><item><title><![CDATA[Reply to Ability to modify documentation defaults on Wed, 15 Jul 2020 13:39:01 GMT]]></title><description><![CDATA[<p dir="auto">Hm, do you mean add <code>JSON.parse(response)</code> to the result object?</p>
]]></description><link>https://community.appdrag.com/post/795</link><guid isPermaLink="true">https://community.appdrag.com/post/795</guid><dc:creator><![CDATA[ThomasD]]></dc:creator><pubDate>Wed, 15 Jul 2020 13:39:01 GMT</pubDate></item></channel></rss>