Changeset 6366
- Timestamp:
- 02/25/08 18:37:21 (11 months ago)
- Files:
-
- sandbox/tschaub/request/lib/OpenLayers/Ajax.js (modified) (1 diff)
- sandbox/tschaub/request/lib/OpenLayers/Format/KML.js (modified) (1 diff)
- sandbox/tschaub/request/lib/OpenLayers/Request.js (modified) (12 diffs)
- sandbox/tschaub/request/tests/manual/ajax.html (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/tschaub/request/lib/OpenLayers/Ajax.js
r6349 r6366 72 72 } 73 73 74 return OpenLayers.Request. get({url: uri, callback: complete});74 return OpenLayers.Request.GET({url: uri, callback: complete}); 75 75 }; 76 76 sandbox/tschaub/request/lib/OpenLayers/Format/KML.js
r6357 r6366 250 250 */ 251 251 fetchLink: function(href) { 252 var request = OpenLayers.Request. get({url: href, async: false});252 var request = OpenLayers.Request.GET({url: href, async: false}); 253 253 if (request) { 254 254 return request.responseText; sandbox/tschaub/request/lib/OpenLayers/Request.js
r6361 r6366 105 105 106 106 /** 107 * APIMethod: get107 * APIMethod: GET 108 108 * Send an HTTP GET request. Additional configuration properties are 109 109 * documented in the <issue> method, with the method property set … … 117 117 * {XMLHttpRequest} Request object. 118 118 */ 119 get: function(config) {119 GET: function(config) { 120 120 config = OpenLayers.Util.extend(config, {method: "GET"}); 121 121 return OpenLayers.Request.issue(config); … … 123 123 124 124 /** 125 * APIMethod: post125 * APIMethod: POST 126 126 * Send a POST request. Additional configuration properties are 127 127 * documented in the <issue> method, with the method property set … … 137 137 * {XMLHttpRequest} Request object. 138 138 */ 139 post: function(config) {139 POST: function(config) { 140 140 config = OpenLayers.Util.extend(config, {method: "POST"}); 141 141 // set content type to application/xml if it isn't already set … … 148 148 149 149 /** 150 * APIMethod: put150 * APIMethod: PUT 151 151 * Send an HTTP PUT request. Additional configuration properties are 152 152 * documented in the <issue> method, with the method property set … … 162 162 * {XMLHttpRequest} Request object. 163 163 */ 164 put: function(config) {164 PUT: function(config) { 165 165 config = OpenLayers.Util.extend(config, {method: "PUT"}); 166 166 // set content type to application/xml if it isn't already set … … 173 173 174 174 /** 175 * APIMethod: delete175 * APIMethod: DELETE 176 176 * Send an HTTP DELETE request. Additional configuration properties are 177 177 * documented in the <issue> method, with the method property set … … 185 185 * {XMLHttpRequest} Request object. 186 186 */ 187 "delete": function(config) {187 DELETE: function(config) { 188 188 config = OpenLayers.Util.extend(config, {method: "DELETE"}); 189 189 return OpenLayers.Request.issue(config); … … 191 191 192 192 /** 193 * APIMethod: head193 * APIMethod: HEAD 194 194 * Send an HTTP HEAD request. Additional configuration properties are 195 195 * documented in the <issue> method, with the method property set … … 203 203 * {XMLHttpRequest} Request object. 204 204 */ 205 head: function(config) {205 HEAD: function(config) { 206 206 config = OpenLayers.Util.extend(config, {method: "HEAD"}); 207 207 return OpenLayers.Request.issue(config); … … 209 209 210 210 /** 211 * APIMethod: options211 * APIMethod: OPTIONS 212 212 * Send an HTTP OPTIONS request. Additional configuration properties are 213 213 * documented in the <issue> method, with the method property set … … 221 221 * {XMLHttpRequest} Request object. 222 222 */ 223 options: function(config) {223 OPTIONS: function(config) { 224 224 config = OpenLayers.Util.extend(config, {method: "OPTIONS"}); 225 225 return OpenLayers.Request.issue(config); sandbox/tschaub/request/tests/manual/ajax.html
r6349 r6366 6 6 var url = "ajax.txt"; 7 7 function sendSynchronous(){ 8 var request = OpenLayers.Request. get({8 var request = OpenLayers.Request.GET({ 9 9 url: url, 10 10 async: false, … … 16 16 } 17 17 function sendAsynchronous(){ 18 var request = OpenLayers.Request. get({18 var request = OpenLayers.Request.GET({ 19 19 url: url, 20 20 callback: function() { … … 25 25 } 26 26 function sendAndAbort(){ 27 var request = OpenLayers.Request. get({27 var request = OpenLayers.Request.GET({ 28 28 url: url, 29 29 callback: function() {
