Requests.js: update documentation
This commit is contained in:
parent
a737bca563
commit
78aaaea9d3
1 changed files with 22 additions and 14 deletions
|
@ -42,10 +42,12 @@ Ox.getAsync <f> Runs an asynchonous loader for an array of URLs
|
|||
code <n> Status code
|
||||
text <s> Status text
|
||||
callback <f> Callback function
|
||||
results <*|o|null> Result(s), or `null` on error
|
||||
result <*|o|null> Result(s), or `null` on error
|
||||
For multiple URLs, keys are URLs, values are results, `{}` on error
|
||||
errors <o|null> Error(s), or `null` on success
|
||||
error <o|null> Error(s), or `null` on success
|
||||
For multiple URLs, keys are URLs, values are errors, `{}` on success
|
||||
code <n> Error code (like `404`)
|
||||
text <s> Error text (like `'Not Found'`)
|
||||
@*/
|
||||
Ox.getAsync = function(urls, get, callback) {
|
||||
urls = Ox.makeArray(urls);
|
||||
|
@ -208,10 +210,12 @@ Ox.getJSON <f> Get and parse one or more remote JSON files
|
|||
(url, callback) -> <u> undefined
|
||||
url <s|a> One or more remote URLs
|
||||
callback <f> Callback function
|
||||
data <*|o|null> The parsed content of the remote resource(s)
|
||||
For multiple URLs, keys are URLs, values are parsed contents
|
||||
error <o|null> Error(s)
|
||||
For multiple URLs, keys are URLs, values are error objects
|
||||
data <*|o|null> Parsed contents, or `null` on error
|
||||
For multiple URLs, keys are URLs, values are data, `{}` on error
|
||||
error <o|null> Error(s), or `null` on success
|
||||
For multiple URLs, keys are URLs, values are errors, `{}` on success
|
||||
code <n> Error code (like `404`)
|
||||
text <s> Error text (like `'Not Found'`)
|
||||
@*/
|
||||
Ox.getJSON = function(url, callback, isJSONC) {
|
||||
var urls = Ox.makeArray(url);
|
||||
|
@ -230,10 +234,12 @@ Ox.getJSONC <f> Get and parse a remote JSONC file
|
|||
(url, callback) -> <u> undefined
|
||||
url <s|a> One or more remote URLs
|
||||
callback <f> Callback function
|
||||
data <*|o|null> The parsed content of the remote resource(s)
|
||||
For multiple URLs, keys are URLs, values are parsed contents
|
||||
error <o|null> Error(s)
|
||||
For multiple URLs, keys are URLs, values are error objects
|
||||
data <*|o|null> Parsed contents, or `null` on error
|
||||
For multiple URLs, keys are URLs, values are data, `{}` on error
|
||||
error <o|null> Error(s), or `null` on success
|
||||
For multiple URLs, keys are URLs, values are errors, `{}` on success
|
||||
code <n> Error code (like `404`)
|
||||
text <s> Error text (like `'Not Found'`)
|
||||
@*/
|
||||
Ox.getJSONC = function(url, callback) {
|
||||
Ox.getJSON(url, callback, true);
|
||||
|
@ -245,10 +251,12 @@ Ox.getJSONP <f> Get and parse one or more remote JSONP files
|
|||
url <s|a> One or more remote URLs
|
||||
{callback} gets replaced with jsonp callback function name
|
||||
callback <f> Callback function
|
||||
data <*|o|null> The parsed content of the remote resource(s)
|
||||
For multiple URLs, keys are URLs, values are parsed contents
|
||||
error <o|null> Error(s)
|
||||
For multiple URLs, keys are URLs, values are error objects
|
||||
data <*|o|null> Parsed contents, or `null` on error
|
||||
For multiple URLs, keys are URLs, values are data, `{}` on error
|
||||
error <o|null> Error(s), or `null` on success
|
||||
For multiple URLs, keys are URLs, values are errors, `{}` on success
|
||||
code <n> Error code (like `404`)
|
||||
text <s> Error text (like `'Not Found'`)
|
||||
@*/
|
||||
Ox.getJSONP = function(url, callback) {
|
||||
var urls = Ox.makeArray(url);
|
||||
|
|
Loading…
Reference in a new issue