《Slides Dev Web》 06. HTTP & AJAX
dynamiques de formulaires, autocompletion – Validation avec interrogation du serveur – … L’objet XMLHttpRequest • Initiative de Microsoft – Composant ActiveX de IE5 – Adopté par Mozilla 1.0 et Safari 1.2 ss.com/Content/Development/JavaScript/Articl es/GIFAsPipe/Index.cfm 10https://www.w3.org/TR/XMLHttpRequest/ 4 • Supporté par la majorité des navigateurs • Alternative souhaitable si JS désactivé XHR ActiveXObject) { xhr = new ActiveXObject("Microsoft.XMLHTTP"); } else if (window.XMLHttpRequest) { xhr = new XMLHttpRequest(); } } • Dans son contexte11 XHR en jQuery avec load()0 码力 | 11 页 | 91.09 KB | 1 年前3Google Java Style Guide
almost entirely disregarded. Exam- ples: Prose form Correct Incorrect “XML HTTP request” XmlHttpRequest XMLHTTPRequest “new customer ID” newCustomerId newCustomerID “inner stopwatch” innerStopwatch innerStopWatch0 码力 | 19 页 | 84.76 KB | 1 年前3The Express Handbook
cookies sent by the request (needs the cookie-parser middleware) .xhr true if the request is an XMLHttpRequest 5. Send a response to the client In the Hello World example we used the send() method of0 码力 | 34 页 | 518.49 KB | 1 年前3Apache Unomi 1.1.x - Documentation
var url = 'http://localhost:8181/context.json?sessionId=' + sessionId; var xhr = new XMLHttpRequest(); var isGet = data.length < 100; if (isGet) { xhr.withCredentials = true;0 码力 | 32 页 | 477.20 KB | 1 年前3CakePHP Cookbook 2.x
is OPTIONS. is('ajax') Check to see whether the current request came with X-Requested- With = XMLHttpRequest. is('ssl') Check to see whether the request is via SSL is('flash') Check to see whether the request }); JsHelper::request($url, $options = array()) Generate a JavaScript snippet to create an XmlHttpRequest or ‘AJAX’ request. Event Options complete - Callback to fire on complete. success - Callback JsHelper::submit($caption = null, $options = array()) Create a submit input button that enables XmlHttpRequest submitted forms. Options can include both those for FormHelper::submit() and JsBaseEngine::request()0 码力 | 1096 页 | 958.62 KB | 1 年前3CakePHP Cookbook 2.x
OPTIONS. • is('ajax') Check to see whether the current request came with X-Requested-With = XMLHttpRequest. • is('ssl') Check to see whether the request is via SSL • is('flash') Check to see whether }); JsHelper::request($url, $options = array()) Generate a JavaScript snippet to create an XmlHttpRequest or ‘AJAX’ request. Event Options • complete - Callback to fire on complete. • success - Callback JsHelper::submit($caption = null, $options = array()) Create a submit input button that enables XmlHttpRequest submitted forms. Options can include both those for FormHelper::submit() and JsBaseEngine::request()0 码力 | 820 页 | 2.52 MB | 1 年前3Tornado 4.5 Documentation
orgery Prior to release 1.1.1, this check was ignored if the HTTP header X-Requested- With: XMLHTTPRequest was present. This exception has been shown to be insecure and has been removed. For more information backwards-incompatible change. Applications that previously relied on a blanket exception for XMLHTTPRequest may need to be modified to explicitly include the XSRF token when making ajax requests. The0 码力 | 333 页 | 322.34 KB | 1 年前3Tornado 4.5 Documentation
forgery Prior to release 1.1.1, this check was ignored if the HTTP header X-Requested-With: XMLHTTPRequest was present. This exception has been shown to be insecure and has been re- moved. For more information backwards-incompatible change. Applications that previously relied on a blanket exception for XMLHTTPRequest may need to be modified to explicitly include the XSRF token when making ajax requests. The0 码力 | 222 页 | 833.04 KB | 1 年前3Tornado 5.1 Documentation
forgery Prior to release 1.1.1, this check was ignored if the HTTP header X-Requested-With: XMLHTTPRequest was present. This exception has been shown to be insecure and has been re- moved. For more information backwards-incompatible change. Applications that previously relied on a blanket exception for XMLHTTPRequest may need to be modified to explicitly include the XSRF token when making ajax requests. The0 码力 | 243 页 | 895.80 KB | 1 年前3Django 1.8.x Documentation
>>> c.get('/customers/details/', {'name': 'fred', 'age': 7}, ... HTTP_X_REQUESTED_WITH='XMLHttpRequest') …will send the HTTP header HTTP_X_REQUESTED_WITH to the details view, which is a good way as POST data with every POST request. For this reason, there is an alternative method: on each XMLHttpRequest, set a custom X-CSRFToken header to the value of the CSRF token. This is often easier, because made via an XMLHttpRequest, by checking the HTTP_X_REQUESTED_WITH header for the string 'XMLHttpRequest'. Most modern JavaScript libraries send this header. If you write your own XMLHttpRequest call (on the0 码力 | 2454 页 | 2.85 MB | 1 年前3
共 129 条
- 1
- 2
- 3
- 4
- 5
- 6
- 13