You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
53 KiB

2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. This file is part of Ext JS 3.4
  3. Copyright (c) 2011-2013 Sencha Inc
  4. Contact: http://www.sencha.com/contact
  5. GNU General Public License Usage
  6. This file may be used under the terms of the GNU General Public License version 3.0 as
  7. published by the Free Software Foundation and appearing in the file LICENSE included in the
  8. packaging of this file.
  9. Please review the following information to ensure the GNU General Public License version 3.0
  10. requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  11. If you are unsure which license is appropriate for your use, please contact the sales department
  12. at http://www.sencha.com/contact.
  13. Build date: 2013-04-03 15:07:25
  14. */
  15. Ext.data.JsonP.Ext_data_Connection({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":["Ext.Ajax"],"extends":"Ext.util.Observable","uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Hierarchy</h4><div class='subclass first-child'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='docClass'>Ext.util.Observable</a><div class='subclass '><strong>Ext.data.Connection</strong></div></div><h4>Subclasses</h4><div class='dependency'><a href='#!/api/Ext.Ajax' rel='Ext.Ajax' class='docClass'>Ext.Ajax</a></div><h4>Files</h4><div class='dependency'><a href='source/Connection.html#Ext-data-Connection' target='_blank'>Connection.js</a></div></pre><div class='doc-contents'><p>The class encapsulates a connection to the page's originating domain, allowing requests to be made\neither to a configured URL, or to a URL specified at request time.</p>\n\n\n<p>Requests made by this class are asynchronous, and will return immediately. No data from\nthe server will be available to the statement immediately following the <a href=\"#!/api/Ext.data.Connection-method-request\" rel=\"Ext.data.Connection-method-request\" class=\"docClass\">request</a> call.\nTo process returned data, use a\n<a href=\"#request-option-success\" ext:member=\"request-option-success\" ext:cls=\"Ext.data.Connection\">success callback</a>\nin the request options object,\nor an <a href=\"#!/api/Ext.data.Connection-event-requestcomplete\" rel=\"Ext.data.Connection-event-requestcomplete\" class=\"docClass\">event listener</a>.</p>\n\n\n<p><h3>File Uploads</h3><a href=\"#request-option-isUpload\" ext:member=\"request-option-isUpload\" ext:cls=\"Ext.data.Connection\">File uploads</a> are not performed using normal \"Ajax\" techniques, that\nis they are <b>not</b> performed using XMLHttpRequests. Instead the form is submitted in the standard\nmanner with the DOM <tt>&lt;form></tt> element temporarily modified to have its\n<a href=\"http://www.w3.org/TR/REC-html40/present/frames.html#adef-target\">target</a> set to refer\nto a dynamically generated, hidden <tt>&lt;iframe></tt> which is inserted into the document\nbut removed after the return data has been gathered.</p>\n\n\n<p>The server response is parsed by the browser to create the document for the IFRAME. If the\nserver is using JSON to send the return object, then the\n<a href=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17\">Content-Type</a> header\nmust be set to \"text/html\" in order to tell the browser to insert the text unchanged into the document body.</p>\n\n\n<p>Characters which are significant to an HTML parser must be sent as HTML entities, so encode\n\"&lt;\" as \"&amp;lt;\", \"&amp;\" as \"&amp;amp;\" etc.</p>\n\n\n<p>The response text is retrieved from the document, and a fake XMLHttpRequest object\nis created containing a <tt>responseText</tt> property in order to conform to the\nrequirements of event handlers and callbacks.</p>\n\n\n<p>Be aware that file upload packets are sent with the content type <a href=\"http://www.faqs.org/rfcs/rfc2388.html\">multipart/form</a>\nand some server technologies (notably JEE) may require some custom processing in order to\nretrieve parameter names and parameter values from the packet content.</p>\n\n\n<p>Also note that it's not possible to check the response code of the hidden iframe, so the success handler will ALWAYS fire.</p>\n\n</div><div class='members'><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-cfg'>Config options</h3><div class='subsection'><div id='cfg-defaultHeaders' class='member first-child not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.data.Connection'>Ext.data.Connection</span><br/><a href='source/Connection.html#Ext-data-Connection-cfg-defaultHeaders' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.data.Connection-cfg-defaultHeaders' class='name expandable'>defaultHeaders</a><span> : Object</span></d