Permalink
Browse files

Merge: Added the PATCH and HEAD methods to Request

* pr/2610:
  Typo
  Doc
  Added the PATCH and HEAD methods
  • Loading branch information...
SergioCrisostomo committed Jun 30, 2014
2 parents 8a3d562 + 829c06f commit 2c72ef2f0f9fdb54e94da825dae2b6bb42da6b5e
Showing with 4 additions and 2 deletions.
  1. +3 −1 Docs/Request/Request.md
  2. +1 −1 Source/Request/Request.js
View
@@ -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.
@@ -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

0 comments on commit 2c72ef2

Please sign in to comment.