From f4f54148002f56d5ce7815539fdf01173c7f2464 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Tue, 4 Nov 2008 01:10:17 +0000 Subject: [PATCH] Updated request docs. git-svn-id: http://svn.openlayers.org/trunk/openlayers@8254 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Request.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/lib/OpenLayers/Request.js b/lib/OpenLayers/Request.js index e0ca23a1b4..8b2d0ad000 100644 --- a/lib/OpenLayers/Request.js +++ b/lib/OpenLayers/Request.js @@ -33,7 +33,10 @@ OpenLayers.Request = { /** * APIMethod: issue * Create a new XMLHttpRequest object, open it, set any headers, bind - * a callback to done state, and send any data. + * a callback to done state, and send any data. It is recommended that + * you use one , , , , , or . + * This method is only documented to provide detail on the configuration + * options available to all request methods. * * Parameters: * config - {Object} Object containing properties for configuring the @@ -53,12 +56,20 @@ OpenLayers.Request = { * . * params - {Object} Any key:value pairs to be appended to the * url as a query string. Assumes url doesn't already include a query - * string or hash. Parameter values that are arrays will be + * string or hash. Typically, this is only appropriate for + * requests where the query string will be appended to the url. + * Parameter values that are arrays will be * concatenated with a comma (note that this goes against form-encoding) * as is done with . * headers - {Object} Object with header:value pairs to be set on * the request. - * data - {Object} Any data to send with the request. + * data - {String | Document} Optional data to send with the request. + * Typically, this is only used with and requests. + * Make sure to provide the appropriate "Content-Type" header for your + * data. For and requests, the content type defaults to + * "application-xml". If your data is a different content type, or + * if you are using a different HTTP method, set the "Content-Type" + * header to match your data type. * callback - {Function} Function to call when request is done. * To determine if the request failed, check request.status (200 * indicates success).