UNPKG

177 kBHTMLView Raw
1<!DOCTYPE html>
2
3<html lang="en">
4<head>
5 <meta charset="utf-8">
6 <meta name="viewport" content="width=device-width">
7 <title>CrossBrowdy API documentation Namespace: XHR</title>
8
9 <!--[if lt IE 9]>
10 <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11 <![endif]-->
12 <link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
13
14 <link type="text/css" rel="stylesheet" href="styles/site.cosmo.css">
15
16</head>
17
18<body style="min-width:800px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
19
20<div class="navbar navbar-default navbar-fixed-top ">
21<div class="container">
22 <div class="navbar-header">
23 <a class="navbar-brand" href="index.html">CrossBrowdy API documentation</a>
24 <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
25 <span class="icon-bar"></span>
26 <span class="icon-bar"></span>
27 <span class="icon-bar"></span>
28 </button>
29 </div>
30 <div class="navbar-collapse collapse" id="topNavigation">
31 <ul class="nav navbar-nav">
32
33 <li class="dropdown">
34 <a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b class="caret"></b></a>
35 <ul class="dropdown-menu inline">
36 <li><a href="CB_Arrays.html">CB_Arrays</a></li><li><a href="CB_AudioDetector.html">CB_AudioDetector</a></li><li><a href="CB_Client.html">CB_Client</a></li><li><a href="CB_Collisions.html">CB_Collisions</a></li><li><a href="CB_Configuration.html">CB_Configuration</a></li><li><a href="CB_Configuration.CrossBase.html">CB_Configuration.CrossBase</a></li><li><a href="CB_Configuration.CrossBrowdy.html">CB_Configuration.CrossBrowdy</a></li><li><a href="CB_Controllers.html">CB_Controllers</a></li><li><a href="CB_Controllers_Proprietary.html">CB_Controllers_Proprietary</a></li><li><a href="CB_Controllers_Proprietary.WII.html">CB_Controllers_Proprietary.WII</a></li><li><a href="CB_Controllers_Proprietary.WII_U.html">CB_Controllers_Proprietary.WII_U</a></li><li><a href="CB_Device.html">CB_Device</a></li><li><a href="CB_Device.AmbientLight.html">CB_Device.AmbientLight</a></li><li><a href="CB_Device.Battery.html">CB_Device.Battery</a></li><li><a href="CB_Device.Location.html">CB_Device.Location</a></li><li><a href="CB_Device.Motion.html">CB_Device.Motion</a></li><li><a href="CB_Device.Orientation.html">CB_Device.Orientation</a></li><li><a href="CB_Device.Proximity.html">CB_Device.Proximity</a></li><li><a href="CB_Device.Vibration.html">CB_Device.Vibration</a></li><li><a href="CB_Elements.html">CB_Elements</a></li><li><a href="CB_Events.html">CB_Events</a></li><li><a href="CB_Keyboard.html">CB_Keyboard</a></li><li><a href="CB_Keyboard.chars.html">CB_Keyboard.chars</a></li><li><a href="CB_Keyboard.extended.html">CB_Keyboard.extended</a></li><li><a href="CB_Keyboard.keys.html">CB_Keyboard.keys</a></li><li><a href="CB_Modules.html">CB_Modules</a></li><li><a href="CB_Mouse.html">CB_Mouse</a></li><li><a href="CB_Mouse.CursorImage.html">CB_Mouse.CursorImage</a></li><li><a href="CB_Net.html">CB_Net</a></li><li><a href="CB_Net.Fetch.html">CB_Net.Fetch</a></li><li><a href="CB_Net.REST.html">CB_Net.REST</a></li><li><a href="CB_Net.Sockets.html">CB_Net.Sockets</a></li><li><a href="CB_Net.Sockets.SockJS.html">CB_Net.Sockets.SockJS</a></li><li><a href="CB_Net.XHR.html">CB_Net.XHR</a></li><li><a href="CB_Pointer.html">CB_Pointer</a></li><li><a href="CB_Screen.html">CB_Screen</a></li><li><a href="CB_Speaker.html">CB_Speaker</a></li><li><a href="CB_Touch.html">CB_Touch</a></li><li><a href="CB_baseSymbols.html">CB_baseSymbols</a></li>
37 </ul>
38 </li>
39
40 <li class="dropdown">
41 <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
42 <ul class="dropdown-menu inline">
43 <li><a href="CB_AudioFile.html">CB_AudioFile</a></li><li><a href="CB_AudioFileCache.html">CB_AudioFileCache</a></li><li><a href="CB_AudioFileSprites.html">CB_AudioFileSprites</a></li><li><a href="CB_AudioFileSpritesPool.html">CB_AudioFileSpritesPool</a></li><li><a href="CB_AudioFile_API.AAPI.html">CB_AudioFile_API.AAPI</a></li><li><a href="CB_AudioFile_API.ACMP.html">CB_AudioFile_API.ACMP</a></li><li><a href="CB_AudioFile_API.SM2.html">CB_AudioFile_API.SM2</a></li><li><a href="CB_AudioFile_API.WAAPI.html">CB_AudioFile_API.WAAPI</a></li><li><a href="CB_Canvas.html">CB_Canvas</a></li><li><a href="CB_GraphicSprites.html">CB_GraphicSprites</a></li><li><a href="CB_GraphicSpritesScene.html">CB_GraphicSpritesScene</a></li>
44 </ul>
45 </li>
46
47 <li class="dropdown">
48 <a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
49 <ul class="dropdown-menu inline">
50 <li><a href="global.html#CB_BASE_NAME">CB_BASE_NAME</a></li><li><a href="global.html#CB_CREDITS_DEFAULT">CB_CREDITS_DEFAULT</a></li><li><a href="global.html#CB_NAME">CB_NAME</a></li><li><a href="global.html#CB_OPTIONS">CB_OPTIONS</a></li><li><a href="global.html#CB_VERSION">CB_VERSION</a></li><li><a href="global.html#CB_addCredits">CB_addCredits</a></li><li><a href="global.html#CB_baseToBase">CB_baseToBase</a></li><li><a href="global.html#CB_baseToInt">CB_baseToInt</a></li><li><a href="global.html#CB_br2nl">CB_br2nl</a></li><li><a href="global.html#CB_brToNl">CB_brToNl</a></li><li><a href="global.html#CB_combineArraysOrObjects">CB_combineArraysOrObjects</a></li><li><a href="global.html#CB_combineAutomatically">CB_combineAutomatically</a></li><li><a href="global.html#CB_combineJSON">CB_combineJSON</a></li><li><a href="global.html#CB_combineURIParameters">CB_combineURIParameters</a></li><li><a href="global.html#CB_combineURLParameters">CB_combineURLParameters</a></li><li><a href="global.html#CB_console">CB_console</a></li><li><a href="global.html#CB_copyObject">CB_copyObject</a></li><li><a href="global.html#CB_countDecimalDigits">CB_countDecimalDigits</a></li><li><a href="global.html#CB_countDecimalPart">CB_countDecimalPart</a></li><li><a href="global.html#CB_countDecimals">CB_countDecimals</a></li><li><a href="global.html#CB_countIntegerDigits">CB_countIntegerDigits</a></li><li><a href="global.html#CB_countIntegerPart">CB_countIntegerPart</a></li><li><a href="global.html#CB_credits">CB_credits</a></li><li><a href="global.html#CB_forEach">CB_forEach</a></li><li><a href="global.html#CB_forceString">CB_forceString</a></li><li><a href="global.html#CB_getBase64StringObject">CB_getBase64StringObject</a></li><li><a href="global.html#CB_getCookie">CB_getCookie</a></li><li><a href="global.html#CB_getDatum">CB_getDatum</a></li><li><a href="global.html#CB_getJSONPropertyValue">CB_getJSONPropertyValue</a></li><li><a href="global.html#CB_getLZStringObject">CB_getLZStringObject</a></li><li><a href="global.html#CB_getValueIndex">CB_getValueIndex</a></li><li><a href="global.html#CB_getValuePath">CB_getValuePath</a></li><li><a href="global.html#CB_includeJSFile">CB_includeJSFile</a></li><li><a href="global.html#CB_indexOf">CB_indexOf</a></li><li><a href="global.html#CB_init">CB_init</a></li><li><a href="global.html#CB_intToBase">CB_intToBase</a></li><li><a href="global.html#CB_isArray">CB_isArray</a></li><li><a href="global.html#CB_isEmail">CB_isEmail</a></li><li><a href="global.html#CB_isFileLocal">CB_isFileLocal</a></li><li><a href="global.html#CB_isString">CB_isString</a></li><li><a href="global.html#CB_lastIndexOf">CB_lastIndexOf</a></li><li><a href="global.html#CB_ltrim">CB_ltrim</a></li><li><a href="global.html#CB_nl2br">CB_nl2br</a></li><li><a href="global.html#CB_nlToBr">CB_nlToBr</a></li><li><a href="global.html#CB_numberFormat">CB_numberFormat</a></li><li><a href="global.html#CB_numberOfDecimalDigits">CB_numberOfDecimalDigits</a></li><li><a href="global.html#CB_numberOfDecimals">CB_numberOfDecimals</a></li><li><a href="global.html#CB_numberOfIntegerDigits">CB_numberOfIntegerDigits</a></li><li><a href="global.html#CB_parseJSON">CB_parseJSON</a></li><li><a href="global.html#CB_parseString">CB_parseString</a></li><li><a href="global.html#CB_regularExpressionString">CB_regularExpressionString</a></li><li><a href="global.html#CB_renderString">CB_renderString</a></li><li><a href="global.html#CB_replaceAll">CB_replaceAll</a></li><li><a href="global.html#CB_rtrim">CB_rtrim</a></li><li><a href="global.html#CB_scriptPath">CB_scriptPath</a></li><li><a href="global.html#CB_scriptPathCalculate">CB_scriptPathCalculate</a></li><li><a href="global.html#CB_setCookie">CB_setCookie</a></li><li><a href="global.html#CB_setDatum">CB_setDatum</a></li><li><a href="global.html#CB_sizeOf">CB_sizeOf</a></li><li><a href="global.html#CB_sizeof">CB_sizeof</a></li><li><a href="global.html#CB_stringifyJSON">CB_stringifyJSON</a></li><li><a href="global.html#CB_symmetricCall">CB_symmetricCall</a></li><li><a href="global.html#CB_symmetricCallClear">CB_symmetricCallClear</a></li><li><a href="global.html#CB_this">CB_this</a></li><li><a href="global.html#CB_trim">CB_trim</a></li>
51 </ul>
52 </li>
53
54 </ul>
55
56 <div class="col-sm-3 col-md-3">
57 <form class="navbar-form" role="search">
58 <div class="input-group">
59 <input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
60 <div class="input-group-btn">
61 <button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
62 </div>
63 </div>
64 </form>
65 </div>
66
67 </div>
68
69</div>
70</div>
71
72
73<div class="container" id="toc-content" style="width:100%;">
74<div class="row" style="width:100%;">
75
76
77 <div class="col-md-8" style="width:85%;">
78
79 <div id="main">
80
81
82
83 <h1 class="page-title">Namespace: XHR</h1>
84
85<section>
86
87<header>
88
89 <h2>
90 <span class="ancestors"><a href="CB_Net.html">CB_Net</a>.</span>
91
92 XHR
93 </h2>
94
95
96</header>
97
98
99<article>
100 <div class="container-overview">
101
102
103 <div class="description"><p>Static class to manage <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/XMLHttpRequest">XMLHttpRequest</a> (<a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/XMLHttpRequest">XHR</a>, <a href="https://en.wikipedia.org/wiki/Ajax_(programming)">AJAX</a>) and related. It will return itself if it is tried to be instantiated.</p></div>
104
105
106
107<dl class="details">
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
138 <dd class="tag-source">
139 <ul class="dummy">
140 <li>
141 <a href="CrossBase_net_XHR_CB_Net_XHR.js.html">CrossBase/net/XHR/CB_Net_XHR.js</a>,
142 <a href="CrossBase_net_XHR_CB_Net_XHR.js.html#sunlight-1-line-15">line 15</a>
143 </li>
144 </ul>
145 </dd>
146
147
148
149
150
151
152
153 <dt class="tag-todo method-doc-label method-doc-details-label">To Do:</dt>
154 <dd class="tag-todo">
155 <ul>
156 <li>Think about providing an easy way to abort XHR (AJAX) calls.</li>
157 </ul>
158 </dd>
159
160</dl>
161
162
163
164
165 </div>
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180 <h3 class="subsection-title">Methods</h3>
181
182 <dl>
183
184<hr>
185<dt>
186 <h4 class="name" id=".call"><span class="type-signature">&lt;static> </span>call<span class="signature">(URL [, method] [, data] [, headers] [, responseType] [, mimeType] [, callbackFunction] [, callbackFunctionOK] [, callbackFunctionError] [, allowedSuccessStatuses] [, asynchronous] [, XHR])</span><span class="type-signature"> &rarr; {Object|null}</span></h4>
187
188
189</dt>
190<dd>
191
192
193 <div class="description">
194 <p>Performs an <a href="https://en.wikipedia.org/wiki/Ajax_(programming)">AJAX</a> (<a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/XMLHttpRequest">XHR</a>) call.</p>
195 </div>
196
197
198
199
200
201
202
203
204 <h5>Parameters:</h5>
205
206
207<table class="params table table-striped">
208 <thead>
209 <tr>
210
211 <th style="width:12%; min-width:110px;">Name</th>
212
213
214 <th style="width:12%; min-width:110px;">Type</th>
215
216
217 <th style="width:12%; min-width:110px;">Argument</th>
218
219
220
221 <th style="width:12%; min-width:110px;">Default</th>
222
223
224 <th class="last" style="min-width:310px;">Description</th>
225 </tr>
226 </thead>
227
228 <tbody>
229
230
231 <tr>
232
233 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>URL</code></td>
234
235
236 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
237
238
239<span class="param-type">string</span>
240
241
242
243
244 </td>
245
246
247 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
248
249
250
251
252
253 </td>
254
255
256
257 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
258
259 </td>
260
261
262 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The URL that we want to call. It can also contain URL (GET) parameters.</p></td>
263 </tr>
264
265
266
267 <tr>
268
269 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>method</code></td>
270
271
272 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
273
274
275<span class="param-type">string</span>
276
277
278
279
280 </td>
281
282
283 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
284
285 &lt;optional><br>
286
287
288
289
290
291 </td>
292
293
294
295 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
296
297 'POST'
298
299 </td>
300
301
302 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods">HTTP method</a> that will be used to perform the call (GET, POST, PUT, DELETE, etc.).</p></td>
303 </tr>
304
305
306
307 <tr>
308
309 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>data</code></td>
310
311
312 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
313
314
315<span class="param-type">string</span>
316|
317
318<span class="param-type">Object</span>
319
320
321
322
323 </td>
324
325
326 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
327
328 &lt;optional><br>
329
330
331
332
333
334 </td>
335
336
337
338 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
339
340 </td>
341
342
343 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The data that we want to send. If a string is given and &quot;GET&quot; method is being used, it will assume they are GET (URL) parameters and will be attached at the end of the URL given. If something which is not a string is given, it will assume it is a <a href="https://en.wikipedia.org/wiki/JSON">JSON</a> object and will try to convert it into a string (using the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify">JSON.stringify</a> function internally) before sending it.</p></td>
344 </tr>
345
346
347
348 <tr>
349
350 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>headers</code></td>
351
352
353 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
354
355
356<span class="param-type"><a href="CB_Net.XHR.html#.HEADERS">CB_Net.XHR.HEADERS</a></span>
357
358
359
360
361 </td>
362
363
364 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
365
366 &lt;optional><br>
367
368
369
370
371
372 </td>
373
374
375
376 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
377
378 </td>
379
380
381 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Object containing the <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers">HTTP header</a> names and their values that we want to send (used internally by the <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/setRequestHeader">setRequestHeader</a> method of the <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/XMLHttpRequest">XHR object</a>).</p></td>
382 </tr>
383
384
385
386 <tr>
387
388 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>responseType</code></td>
389
390
391 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
392
393
394<span class="param-type">string</span>
395
396
397
398
399 </td>
400
401
402 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
403
404 &lt;optional><br>
405
406
407
408
409
410 </td>
411
412
413
414 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
415
416 </td>
417
418
419 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>If provided, it will be used for the <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseType">responseType</a> property of the <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/XMLHttpRequest">XHR object</a> (if available).</p></td>
420 </tr>
421
422
423
424 <tr>
425
426 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>mimeType</code></td>
427
428
429 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
430
431
432<span class="param-type">string</span>
433
434
435
436
437 </td>
438
439
440 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
441
442 &lt;optional><br>
443
444
445
446
447
448 </td>
449
450
451
452 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
453
454 </td>
455
456
457 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types">MIME type</a> that will be used to override the default one returned by the server. Only used when the client supports the <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/overrideMimeType">overrideMimeType</a> method of the <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/XMLHttpRequest">XHR object</a>.</p></td>
458 </tr>
459
460
461
462 <tr>
463
464 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>callbackFunction</code></td>
465
466
467 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
468
469
470<span class="param-type">function</span>
471
472
473
474
475 </td>
476
477
478 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
479
480 &lt;optional><br>
481
482
483
484
485
486 </td>
487
488
489
490 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
491
492 </td>
493
494
495 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Function that will be used for the <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/onreadystatechange">onreadystatechange</a> property of the <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/XMLHttpRequest">XHR object</a>. The unique parameter that it will receive is the <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/XMLHttpRequest">XHR object</a> used by the request. If provided, the &quot;callbackFunctionOK&quot; and &quot;callbackFunctionError&quot; parameters will not be used even they were also provided.</p></td>
496 </tr>
497
498
499
500 <tr>
501
502 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>callbackFunctionOK</code></td>
503
504
505 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
506
507
508<span class="param-type">function</span>
509
510
511
512
513 </td>
514
515
516 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
517
518 &lt;optional><br>
519
520
521
522
523
524 </td>
525
526
527
528 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
529
530 </td>
531
532
533 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Function that will be called by an internally-created function used in the <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/onreadystatechange">onreadystatechange</a> property of the <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/XMLHttpRequest">XHR object</a> when the <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState">readyState</a> property is 4 and the <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/status">status</a> property is included in the &quot;allowedSuccessStatuses&quot; desired. The first parameter it will receive is the <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/XMLHttpRequest">XHR object</a> used by the request and the second one will be the &quot;callbackFunctionError&quot; function provided (if any). It will not be used if the parameter &quot;callbackFunction&quot; is provided.</p></td>
534 </tr>
535
536
537
538 <tr>
539
540 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>callbackFunctionError</code></td>
541
542
543 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
544
545
546<span class="param-type">function</span>
547
548
549
550
551 </td>
552
553
554 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
555
556 &lt;optional><br>
557
558
559
560
561
562 </td>
563
564
565
566 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
567
568 </td>
569
570
571 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Function that will be called by an internally-created function used in the <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/onreadystatechange">onreadystatechange</a> property of the <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/XMLHttpRequest">XHR object</a> when the <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState">readyState</a> property is 4 and the <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/status">status</a> property is not included in the &quot;allowedSuccessStatuses&quot; desired. The first parameter it will receive is the <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/XMLHttpRequest">XHR object</a> used by the request and the second one will be the &quot;callbackFunctionOk&quot; function provided (if any). It will not be used if the parameter &quot;callbackFunction&quot; is provided.</p></td>
572 </tr>
573
574
575
576 <tr>
577
578 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>allowedSuccessStatuses</code></td>
579
580
581 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
582
583
584<span class="param-type">integer</span>
585|
586
587<span class="param-type">array</span>
588
589
590
591
592 </td>
593
594
595 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
596
597 &lt;optional><br>
598
599
600
601
602
603 </td>
604
605
606
607 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
608
609 200
610
611 </td>
612
613
614 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>An integer or a numeric array with a list of integers with the status or statuses that will be considered as a success call by the &quot;callbackFunctionOK&quot; function (only when it is used) when the response comes.</p></td>
615 </tr>
616
617
618
619 <tr>
620
621 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>asynchronous</code></td>
622
623
624 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
625
626
627<span class="param-type">boolean</span>
628
629
630
631
632 </td>
633
634
635 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
636
637 &lt;optional><br>
638
639
640
641
642
643 </td>
644
645
646
647 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
648
649 true
650
651 </td>
652
653
654 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Defines whether to make a request asynchronously or not. It will be used for the third parameter of the method <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/open">open</a> of the <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/XMLHttpRequest">XHR object</a>.</p></td>
655 </tr>
656
657
658
659 <tr>
660
661 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>XHR</code></td>
662
663
664 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
665
666
667<span class="param-type">Object</span>
668
669
670
671
672 </td>
673
674
675 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
676
677 &lt;optional><br>
678
679
680
681
682
683 </td>
684
685
686
687 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
688
689 </td>
690
691
692 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/XMLHttpRequest">XHR object</a> that we want to use for the call. If not provided, it will try to create a new one internally.</p></td>
693 </tr>
694
695
696 </tbody>
697</table>
698
699
700
701
702<dl class="details">
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
733 <dd class="tag-source">
734 <ul class="dummy">
735 <li>
736 <a href="CrossBase_net_XHR_CB_Net_XHR.js.html">CrossBase/net/XHR/CB_Net_XHR.js</a>,
737 <a href="CrossBase_net_XHR_CB_Net_XHR.js.html#sunlight-1-line-120">line 120</a>
738 </li>
739 </ul>
740 </dd>
741
742
743
744
745
746
747
748 <dt class="tag-todo method-doc-label method-doc-details-label">To Do:</dt>
749 <dd class="tag-todo">
750 <ul>
751 <li>Think about providing a way to choose whether we want the "data" provided to be added to the URL when the "GET" method is used or not.</li>
752
753 <li>Describe better what kind of <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/XMLHttpRequest">XHR object</a> will the different callbacks receive, as in some cases (as when using <a href="https://en.wikipedia.org/wiki/Representational_state_transfer">REST</a>) they can contain some special properties with <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers">HTTP headers</a>, etc.</li>
754 </ul>
755 </dd>
756
757</dl>
758
759
760
761
762
763
764
765
766
767
768
769
770
771 <h5>Returns:</h5>
772
773
774<div class="param-desc">
775 <p>Returns null if the URL provided was empty or the <a href="https://en.wikipedia.org/wiki/Ajax_(programming)">AJAX</a> (<a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/XMLHttpRequest">XHR</a>) object provided is not a valid object or it could not be created a new one internally. Otherwise, it returns the <a href="https://en.wikipedia.org/wiki/Ajax_(programming)">AJAX</a> (<a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/XMLHttpRequest">XHR</a>) object used to try to perform the call (even that maybe it failed or will fail later).</p>
776</div>
777
778
779
780<dl>
781 <dt>
782 Type
783 </dt>
784 <dd>
785
786<span class="param-type">Object</span>
787|
788
789<span class="param-type">null</span>
790
791
792
793 </dd>
794</dl>
795
796
797
798
799
800</dd>
801
802
803
804<hr>
805<dt>
806 <h4 class="name" id=".callBinary"><span class="type-signature">&lt;static> </span>callBinary<span class="signature">(URL [, data] [, headers] [, blobOrArrayBuffer] [, callbackFunction] [, callbackFunctionOK] [, callbackFunctionError] [, allowedSuccessStatuses] [, XHR])</span><span class="type-signature"> &rarr; {Object|null}</span></h4>
807
808
809</dt>
810<dd>
811
812
813 <div class="description">
814 <p>Performs a standard <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/XMLHttpRequest">XHR</a> request for a binary file. Uses the <a href="CB_Net.XHR.html#.call"><code>CB_Net.XHR.call</code></a> function internally with &quot;GET&quot; method, using &quot;text/plain; charset=x-user-defined&quot; for the &quot;mimeType&quot; parameter and asynchronously.</p>
815 </div>
816
817
818
819
820
821
822
823
824 <h5>Parameters:</h5>
825
826
827<table class="params table table-striped">
828 <thead>
829 <tr>
830
831 <th style="width:12%; min-width:110px;">Name</th>
832
833
834 <th style="width:12%; min-width:110px;">Type</th>
835
836
837 <th style="width:12%; min-width:110px;">Argument</th>
838
839
840
841 <th style="width:12%; min-width:110px;">Default</th>
842
843
844 <th class="last" style="min-width:310px;">Description</th>
845 </tr>
846 </thead>
847
848 <tbody>
849
850
851 <tr>
852
853 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>URL</code></td>
854
855
856 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
857
858
859<span class="param-type">string</span>
860
861
862
863
864 </td>
865
866
867 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
868
869
870
871
872
873 </td>
874
875
876
877 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
878
879 </td>
880
881
882 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Used for the &quot;URL&quot; parameter of the <a href="CB_Net.XHR.html#.call"><code>CB_Net.XHR.call</code></a> function when it is called internally.</p></td>
883 </tr>
884
885
886
887 <tr>
888
889 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>data</code></td>
890
891
892 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
893
894
895<span class="param-type">string</span>
896|
897
898<span class="param-type">Object</span>
899
900
901
902
903 </td>
904
905
906 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
907
908 &lt;optional><br>
909
910
911
912
913
914 </td>
915
916
917
918 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
919
920 </td>
921
922
923 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Used for the &quot;data&quot; parameter of the <a href="CB_Net.XHR.html#.call"><code>CB_Net.XHR.call</code></a> function when it is called internally.</p></td>
924 </tr>
925
926
927
928 <tr>
929
930 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>headers</code></td>
931
932
933 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
934
935
936<span class="param-type"><a href="CB_Net.XHR.html#.HEADERS">CB_Net.XHR.HEADERS</a></span>
937
938
939
940
941 </td>
942
943
944 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
945
946 &lt;optional><br>
947
948
949
950
951
952 </td>
953
954
955
956 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
957
958 { "Content-Type" : "text/plain; charset=x-user-defined", "Cache-Control" : "no-cache", "Pragma" : "no-cache" }
959
960 </td>
961
962
963 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Object containing the <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers">HTTP header</a> names and their values that we want to send. If not provided, it will use the default one. An empty object ({}) can be used if we do not want to send any <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers">HTTP headers</a> at all. Used for the &quot;headers&quot; parameter of the <a href="CB_Net.XHR.html#.call"><code>CB_Net.XHR.call</code></a> function when it is called internally.</p></td>
964 </tr>
965
966
967
968 <tr>
969
970 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>blobOrArrayBuffer</code></td>
971
972
973 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
974
975
976<span class="param-type">'arraybuffer'</span>
977|
978
979<span class="param-type">'blob'</span>
980|
981
982<span class="param-type">''</span>
983
984
985
986
987 </td>
988
989
990 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
991
992 &lt;optional><br>
993
994
995
996
997
998 </td>
999
1000
1001
1002 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1003
1004 'arraybuffer'
1005
1006 </td>
1007
1008
1009 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Used for the <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseType">responseType</a> parameter of the <a href="CB_Net.XHR.html#.call"><code>CB_Net.XHR.call</code></a> function when it is called internally. If an empty string is provided, the <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseType">responseType</a> parameter will not be modified.</p></td>
1010 </tr>
1011
1012
1013
1014 <tr>
1015
1016 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>callbackFunction</code></td>
1017
1018
1019 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1020
1021
1022<span class="param-type">function</span>
1023
1024
1025
1026
1027 </td>
1028
1029
1030 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1031
1032 &lt;optional><br>
1033
1034
1035
1036
1037
1038 </td>
1039
1040
1041
1042 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1043
1044 </td>
1045
1046
1047 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Used for the &quot;callbackFunction&quot; parameter of the <a href="CB_Net.XHR.html#.call"><code>CB_Net.XHR.call</code></a> function when it is called internally.</p></td>
1048 </tr>
1049
1050
1051
1052 <tr>
1053
1054 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>callbackFunctionOK</code></td>
1055
1056
1057 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1058
1059
1060<span class="param-type">function</span>
1061
1062
1063
1064
1065 </td>
1066
1067
1068 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1069
1070 &lt;optional><br>
1071
1072
1073
1074
1075
1076 </td>
1077
1078
1079
1080 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1081
1082 </td>
1083
1084
1085 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Used for the &quot;callbackFunctionOK&quot; parameter of the <a href="CB_Net.XHR.html#.call"><code>CB_Net.XHR.call</code></a> function when it is called internally.</p></td>
1086 </tr>
1087
1088
1089
1090 <tr>
1091
1092 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>callbackFunctionError</code></td>
1093
1094
1095 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1096
1097
1098<span class="param-type">function</span>
1099
1100
1101
1102
1103 </td>
1104
1105
1106 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1107
1108 &lt;optional><br>
1109
1110
1111
1112
1113
1114 </td>
1115
1116
1117
1118 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1119
1120 </td>
1121
1122
1123 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Used for the &quot;callbackFunctionError&quot; parameter of the <a href="CB_Net.XHR.html#.call"><code>CB_Net.XHR.call</code></a> function when it is called internally.</p></td>
1124 </tr>
1125
1126
1127
1128 <tr>
1129
1130 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>allowedSuccessStatuses</code></td>
1131
1132
1133 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1134
1135
1136<span class="param-type">integer</span>
1137|
1138
1139<span class="param-type">array</span>
1140
1141
1142
1143
1144 </td>
1145
1146
1147 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1148
1149 &lt;optional><br>
1150
1151
1152
1153
1154
1155 </td>
1156
1157
1158
1159 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1160
1161 200
1162
1163 </td>
1164
1165
1166 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Used for the &quot;allowedSuccessStatuses&quot; parameter of the <a href="CB_Net.XHR.html#.call"><code>CB_Net.XHR.call</code></a> function when it is called internally.</p></td>
1167 </tr>
1168
1169
1170
1171 <tr>
1172
1173 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>XHR</code></td>
1174
1175
1176 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1177
1178
1179<span class="param-type">Object</span>
1180
1181
1182
1183
1184 </td>
1185
1186
1187 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1188
1189 &lt;optional><br>
1190
1191
1192
1193
1194
1195 </td>
1196
1197
1198
1199 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1200
1201 </td>
1202
1203
1204 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Used for the &quot;XHR&quot; parameter of the <a href="CB_Net.XHR.html#.call"><code>CB_Net.XHR.call</code></a> function when it is called internally.</p></td>
1205 </tr>
1206
1207
1208 </tbody>
1209</table>
1210
1211
1212
1213
1214<dl class="details">
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1245 <dd class="tag-source">
1246 <ul class="dummy">
1247 <li>
1248 <a href="CrossBase_net_XHR_CB_Net_XHR.js.html">CrossBase/net/XHR/CB_Net_XHR.js</a>,
1249 <a href="CrossBase_net_XHR_CB_Net_XHR.js.html#sunlight-1-line-341">line 341</a>
1250 </li>
1251 </ul>
1252 </dd>
1253
1254
1255
1256
1257
1258
1259
1260</dl>
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274 <h5>Returns:</h5>
1275
1276
1277<div class="param-desc">
1278 <p>Returns the same that the <a href="CB_Net.XHR.html#.call"><code>CB_Net.XHR.call</code></a> function returns (called internally).</p>
1279</div>
1280
1281
1282
1283<dl>
1284 <dt>
1285 Type
1286 </dt>
1287 <dd>
1288
1289<span class="param-type">Object</span>
1290|
1291
1292<span class="param-type">null</span>
1293
1294
1295
1296 </dd>
1297</dl>
1298
1299
1300
1301
1302
1303</dd>
1304
1305
1306
1307<hr>
1308<dt>
1309 <h4 class="name" id=".callForm"><span class="type-signature">&lt;static> </span>callForm<span class="signature">(URL [, data] [, headers] [, responseType] [, charset] [, callbackFunction] [, callbackFunctionOK] [, callbackFunctionError] [, allowedSuccessStatuses] [, XHR])</span><span class="type-signature"> &rarr; {Object|null}</span></h4>
1310
1311
1312</dt>
1313<dd>
1314
1315
1316 <div class="description">
1317 <p>Performs a standard <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/XMLHttpRequest">XHR</a> request to send form data by POST (no files). Uses the <a href="CB_Net.XHR.html#.call"><code>CB_Net.XHR.call</code></a> function internally with &quot;POST&quot; method, asynchronously and &quot;mimeType&quot; parameter not provided.</p>
1318 </div>
1319
1320
1321
1322
1323
1324
1325
1326
1327 <h5>Parameters:</h5>
1328
1329
1330<table class="params table table-striped">
1331 <thead>
1332 <tr>
1333
1334 <th style="width:12%; min-width:110px;">Name</th>
1335
1336
1337 <th style="width:12%; min-width:110px;">Type</th>
1338
1339
1340 <th style="width:12%; min-width:110px;">Argument</th>
1341
1342
1343
1344 <th style="width:12%; min-width:110px;">Default</th>
1345
1346
1347 <th class="last" style="min-width:310px;">Description</th>
1348 </tr>
1349 </thead>
1350
1351 <tbody>
1352
1353
1354 <tr>
1355
1356 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>URL</code></td>
1357
1358
1359 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1360
1361
1362<span class="param-type">string</span>
1363
1364
1365
1366
1367 </td>
1368
1369
1370 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1371
1372
1373
1374
1375
1376 </td>
1377
1378
1379
1380 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1381
1382 </td>
1383
1384
1385 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Used for the &quot;URL&quot; parameter of the <a href="CB_Net.XHR.html#.call"><code>CB_Net.XHR.call</code></a> function when it is called internally.</p></td>
1386 </tr>
1387
1388
1389
1390 <tr>
1391
1392 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>data</code></td>
1393
1394
1395 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1396
1397
1398<span class="param-type">string</span>
1399|
1400
1401<span class="param-type">Object</span>
1402
1403
1404
1405
1406 </td>
1407
1408
1409 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1410
1411 &lt;optional><br>
1412
1413
1414
1415
1416
1417 </td>
1418
1419
1420
1421 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1422
1423 </td>
1424
1425
1426 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Used for the &quot;data&quot; parameter of the <a href="CB_Net.XHR.html#.call"><code>CB_Net.XHR.call</code></a> function when it is called internally.</p></td>
1427 </tr>
1428
1429
1430
1431 <tr>
1432
1433 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>headers</code></td>
1434
1435
1436 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1437
1438
1439<span class="param-type"><a href="CB_Net.XHR.html#.HEADERS">CB_Net.XHR.HEADERS</a></span>
1440
1441
1442
1443
1444 </td>
1445
1446
1447 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1448
1449 &lt;optional><br>
1450
1451
1452
1453
1454
1455 </td>
1456
1457
1458
1459 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1460
1461 { "Content-Type" : "application/x-www-form-urlencoded; charset=" + charset, "Cache-Control" : "no-cache", "Pragma" : "no-cache" }
1462
1463 </td>
1464
1465
1466 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Object containing the <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers">HTTP header</a> names and their values that we want to send. If not provided, it will use the default one that will include the charset defined by the &quot;charset&quot; parameter. An empty object ({}) can be used if we do not want to send any <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers">HTTP headers</a> at all. Used for the &quot;headers&quot; parameter of the <a href="CB_Net.XHR.html#.call"><code>CB_Net.XHR.call</code></a> function when it is called internally.</p></td>
1467 </tr>
1468
1469
1470
1471 <tr>
1472
1473 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>responseType</code></td>
1474
1475
1476 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1477
1478
1479<span class="param-type">string</span>
1480
1481
1482
1483
1484 </td>
1485
1486
1487 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1488
1489 &lt;optional><br>
1490
1491
1492
1493
1494
1495 </td>
1496
1497
1498
1499 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1500
1501 </td>
1502
1503
1504 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Used for the <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseType">responseType</a> parameter of the <a href="CB_Net.XHR.html#.call"><code>CB_Net.XHR.call</code></a> function when it is called internally.</p></td>
1505 </tr>
1506
1507
1508
1509 <tr>
1510
1511 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>charset</code></td>
1512
1513
1514 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1515
1516
1517<span class="param-type">string</span>
1518
1519
1520
1521
1522 </td>
1523
1524
1525 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1526
1527 &lt;optional><br>
1528
1529
1530
1531
1532
1533 </td>
1534
1535
1536
1537 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1538
1539 'UTF-8'
1540
1541 </td>
1542
1543
1544 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The charset for the &quot;Content-Type&quot; <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers">HTTP header</a> that will be sent by default only when no &quot;headers&quot; parameter is provided.</p></td>
1545 </tr>
1546
1547
1548
1549 <tr>
1550
1551 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>callbackFunction</code></td>
1552
1553
1554 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1555
1556
1557<span class="param-type">function</span>
1558
1559
1560
1561
1562 </td>
1563
1564
1565 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1566
1567 &lt;optional><br>
1568
1569
1570
1571
1572
1573 </td>
1574
1575
1576
1577 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1578
1579 </td>
1580
1581
1582 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Used for the &quot;callbackFunction&quot; parameter of the <a href="CB_Net.XHR.html#.call"><code>CB_Net.XHR.call</code></a> function when it is called internally.</p></td>
1583 </tr>
1584
1585
1586
1587 <tr>
1588
1589 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>callbackFunctionOK</code></td>
1590
1591
1592 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1593
1594
1595<span class="param-type">function</span>
1596
1597
1598
1599
1600 </td>
1601
1602
1603 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1604
1605 &lt;optional><br>
1606
1607
1608
1609
1610
1611 </td>
1612
1613
1614
1615 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1616
1617 </td>
1618
1619
1620 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Used for the &quot;callbackFunctionOK&quot; parameter of the <a href="CB_Net.XHR.html#.call"><code>CB_Net.XHR.call</code></a> function when it is called internally.</p></td>
1621 </tr>
1622
1623
1624
1625 <tr>
1626
1627 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>callbackFunctionError</code></td>
1628
1629
1630 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1631
1632
1633<span class="param-type">function</span>
1634
1635
1636
1637
1638 </td>
1639
1640
1641 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1642
1643 &lt;optional><br>
1644
1645
1646
1647
1648
1649 </td>
1650
1651
1652
1653 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1654
1655 </td>
1656
1657
1658 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Used for the &quot;callbackFunctionError&quot; parameter of the <a href="CB_Net.XHR.html#.call"><code>CB_Net.XHR.call</code></a> function when it is called internally.</p></td>
1659 </tr>
1660
1661
1662
1663 <tr>
1664
1665 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>allowedSuccessStatuses</code></td>
1666
1667
1668 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1669
1670
1671<span class="param-type">integer</span>
1672|
1673
1674<span class="param-type">array</span>
1675
1676
1677
1678
1679 </td>
1680
1681
1682 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1683
1684 &lt;optional><br>
1685
1686
1687
1688
1689
1690 </td>
1691
1692
1693
1694 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1695
1696 200
1697
1698 </td>
1699
1700
1701 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Used for the &quot;allowedSuccessStatuses&quot; parameter of the <a href="CB_Net.XHR.html#.call"><code>CB_Net.XHR.call</code></a> function when it is called internally.</p></td>
1702 </tr>
1703
1704
1705
1706 <tr>
1707
1708 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>XHR</code></td>
1709
1710
1711 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1712
1713
1714<span class="param-type">Object</span>
1715
1716
1717
1718
1719 </td>
1720
1721
1722 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1723
1724 &lt;optional><br>
1725
1726
1727
1728
1729
1730 </td>
1731
1732
1733
1734 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1735
1736 </td>
1737
1738
1739 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Used for the &quot;XHR&quot; parameter of the <a href="CB_Net.XHR.html#.call"><code>CB_Net.XHR.call</code></a> function when it is called internally.</p></td>
1740 </tr>
1741
1742
1743 </tbody>
1744</table>
1745
1746
1747
1748
1749<dl class="details">
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1780 <dd class="tag-source">
1781 <ul class="dummy">
1782 <li>
1783 <a href="CrossBase_net_XHR_CB_Net_XHR.js.html">CrossBase/net/XHR/CB_Net_XHR.js</a>,
1784 <a href="CrossBase_net_XHR_CB_Net_XHR.js.html#sunlight-1-line-293">line 293</a>
1785 </li>
1786 </ul>
1787 </dd>
1788
1789
1790
1791
1792
1793
1794
1795</dl>
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809 <h5>Returns:</h5>
1810
1811
1812<div class="param-desc">
1813 <p>Returns the same that the <a href="CB_Net.XHR.html#.call"><code>CB_Net.XHR.call</code></a> function returns (called internally).</p>
1814</div>
1815
1816
1817
1818<dl>
1819 <dt>
1820 Type
1821 </dt>
1822 <dd>
1823
1824<span class="param-type">Object</span>
1825|
1826
1827<span class="param-type">null</span>
1828
1829
1830
1831 </dd>
1832</dl>
1833
1834
1835
1836
1837
1838</dd>
1839
1840
1841
1842<hr>
1843<dt>
1844 <h4 class="name" id=".callProxy"><span class="type-signature">&lt;static> </span>callProxy<span class="signature">(URL [, method] [, data] [, headers] [, responseType] [, forceJSON] [, getHeaders] [, headersForceOneDimension] [, headersForceOneDimensionValues] [, transparentStatus] [, transparentHeaders] [, callbackFunction] [, callbackFunctionOK] [, callbackFunctionError] [, allowedSuccessStatuses] [, XHR])</span><span class="type-signature"> &rarr; {Object|null}</span></h4>
1845
1846
1847</dt>
1848<dd>
1849
1850
1851 <div class="description">
1852 <p>Performs an <a href="https://en.wikipedia.org/wiki/Ajax_(programming)">AJAX</a> (<a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/XMLHttpRequest">XHR</a>) call through the proxy (made with <a href="https://en.wikipedia.org/wiki/PHP">PHP</a> language and using <a href="https://en.wikipedia.org/wiki/CURL">cURL</a>, so it will need a server which supports that) to avoid <a href="https://en.wikipedia.org/wiki/Cross-origin_resource_sharing">cross-domain request</a> limitations of <a href="https://en.wikipedia.org/wiki/Ajax_(programming)">AJAX</a>. Uses the <a href="CB_Net.XHR.html#.callForm"><code>CB_Net.XHR.callForm</code></a> function (with &quot;headers&quot; and &quot;charset&quot; parameters not provided) internally to call the proxy.<br>
1853<br /><br>
1854NOTE: Edit the &quot;CB_proxy.config.php&quot; file to configure the default proxy (set by default in the value of the <a href="CB_Configuration.CrossBase.html#.CB_Net_XHR_PROXY_URL"><code>CB_Configuration.CrossBase.CB_Net_XHR_PROXY_URL</code></a> property). Apart from configuring it, adding some security measures is highly recommended.<br>
1855Have in mind that, for safety reasons, the default proxy only allows to request the URLs defined in the &quot;$allowedURLs&quot; array in the &quot;CB_proxy.config.php&quot; file. Just edit it to allow other URLs.</p>
1856 </div>
1857
1858
1859
1860
1861
1862
1863
1864
1865 <h5>Parameters:</h5>
1866
1867
1868<table class="params table table-striped">
1869 <thead>
1870 <tr>
1871
1872 <th style="width:12%; min-width:110px;">Name</th>
1873
1874
1875 <th style="width:12%; min-width:110px;">Type</th>
1876
1877
1878 <th style="width:12%; min-width:110px;">Argument</th>
1879
1880
1881
1882 <th style="width:12%; min-width:110px;">Default</th>
1883
1884
1885 <th class="last" style="min-width:310px;">Description</th>
1886 </tr>
1887 </thead>
1888
1889 <tbody>
1890
1891
1892 <tr>
1893
1894 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>URL</code></td>
1895
1896
1897 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1898
1899
1900<span class="param-type">string</span>
1901
1902
1903
1904
1905 </td>
1906
1907
1908 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1909
1910
1911
1912
1913
1914 </td>
1915
1916
1917
1918 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1919
1920 </td>
1921
1922
1923 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The URL that we want the proxy to call for us. It can also contain URL (GET) parameters.</p></td>
1924 </tr>
1925
1926
1927
1928 <tr>
1929
1930 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>method</code></td>
1931
1932
1933 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1934
1935
1936<span class="param-type">string</span>
1937
1938
1939
1940
1941 </td>
1942
1943
1944 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1945
1946 &lt;optional><br>
1947
1948
1949
1950
1951
1952 </td>
1953
1954
1955
1956 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1957
1958 'POST'
1959
1960 </td>
1961
1962
1963 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods">HTTP method</a> (GET, POST, PUT, DELETE, etc.) that we want the proxy to use for us when performing the call.</p></td>
1964 </tr>
1965
1966
1967
1968 <tr>
1969
1970 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>data</code></td>
1971
1972
1973 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1974
1975
1976<span class="param-type">string</span>
1977|
1978
1979<span class="param-type">Object</span>
1980
1981
1982
1983
1984 </td>
1985
1986
1987 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1988
1989 &lt;optional><br>
1990
1991
1992
1993
1994
1995 </td>
1996
1997
1998
1999 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
2000
2001 </td>
2002
2003
2004 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The data that we want to send through the proxy to the final server. If something which is not a string is given, it will assume it is a <a href="https://en.wikipedia.org/wiki/JSON">JSON</a> object and will try to convert it into a string (using the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify">JSON.stringify</a> function internally) before sending it.</p></td>
2005 </tr>
2006
2007
2008
2009 <tr>
2010
2011 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>headers</code></td>
2012
2013
2014 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
2015
2016
2017<span class="param-type"><a href="CB_Net.XHR.html#.HEADERS">CB_Net.XHR.HEADERS</a></span>
2018
2019
2020
2021
2022 </td>
2023
2024
2025 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
2026
2027 &lt;optional><br>
2028
2029
2030
2031
2032
2033 </td>
2034
2035
2036
2037 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
2038
2039 </td>
2040
2041
2042 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Object (<a href="https://en.wikipedia.org/wiki/JSON">JSON</a> format) containing the <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers">HTTP header</a> names and their values that we want the proxy to send to the final server. Even if not provided, the proxy could end sending some <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers">HTTP headers</a> depending on the <a href="https://en.wikipedia.org/wiki/CURL">cURL</a> configuration used.</p></td>
2043 </tr>
2044
2045
2046
2047 <tr>
2048
2049 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>responseType</code></td>
2050
2051
2052 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
2053
2054
2055<span class="param-type">string</span>
2056
2057
2058
2059
2060 </td>
2061
2062
2063 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
2064
2065 &lt;optional><br