From d76a79eaa31cd62ec935132cfabcb37eec557228 Mon Sep 17 00:00:00 2001 From: Olivier Laviale Date: Tue, 10 Jun 2014 15:15:01 +0200 Subject: [PATCH 1/3] Added the PATCH and HEAD methods --- Source/Request/Request.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Request/Request.js b/Source/Request/Request.js index 5c10524bf..cfd44dd8f 100644 --- a/Source/Request/Request.js +++ b/Source/Request/Request.js @@ -232,7 +232,7 @@ var Request = this.Request = new Class({ }); var methods = {}; -['get', 'post', 'put', 'delete', 'GET', 'POST', 'PUT', 'DELETE'].each(function(method){ +['get', 'post', 'put', 'delete', 'patch', 'head' 'GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'HEAD'].each(function(method){ methods[method] = function(data){ var object = { method: method From 2a9cc87a78f88020ec239ac5e2d3817e94ce6685 Mon Sep 17 00:00:00 2001 From: Olivier Laviale Date: Tue, 10 Jun 2014 15:28:43 +0200 Subject: [PATCH 2/3] Doc --- Docs/Request/Request.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Docs/Request/Request.md b/Docs/Request/Request.md index aac75696d..5a82f9482 100644 --- a/Docs/Request/Request.md +++ b/Docs/Request/Request.md @@ -289,6 +289,8 @@ These aliases are: - `get()` and `GET()` - `put()` and `PUT()` - `delete()` and `DELETE()` +- `patch()` and `PATCH()` +- `head()` and `HEAD()` ### Syntax: @@ -322,7 +324,7 @@ These aliases are: ### Note: -By default the emulation option is set to true, so the *put* and *delete* send methods are emulated and will actually send as *post* while the method name is sent as e.g. `_method=delete`. +By default the emulation option is set to true, so the *put*, *delete* and *patch* send methods are emulated and will actually send as *post* while the method name is sent as e.g. `_method=delete`. `Async` and `timeout` options are mutually exclusive. If you set `async` to `false`, then there's no need to set the `timeout` since the server and browser will set their own timeouts to return executing the rest of your script. From 829c06f5f7895077df89d4953571e98c8148e3dc Mon Sep 17 00:00:00 2001 From: Olivier Laviale Date: Tue, 10 Jun 2014 16:18:34 +0200 Subject: [PATCH 3/3] Typo --- Source/Request/Request.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Request/Request.js b/Source/Request/Request.js index cfd44dd8f..ff4144607 100644 --- a/Source/Request/Request.js +++ b/Source/Request/Request.js @@ -232,7 +232,7 @@ var Request = this.Request = new Class({ }); var methods = {}; -['get', 'post', 'put', 'delete', 'patch', 'head' 'GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'HEAD'].each(function(method){ +['get', 'post', 'put', 'delete', 'patch', 'head', 'GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'HEAD'].each(function(method){ methods[method] = function(data){ var object = { method: method