Enhancement: Almost all Http methods need to be configurable#401
Open
utf4 wants to merge 1 commit intoplatanus:masterfrom
Open
Enhancement: Almost all Http methods need to be configurable#401utf4 wants to merge 1 commit intoplatanus:masterfrom
utf4 wants to merge 1 commit intoplatanus:masterfrom
Conversation
monkeyci
reviewed
Nov 11, 2016
| { | ||
| var request = { method: 'DELETE', url: url }; | ||
| var request = { | ||
| method: this.$type.getProperty('deleteMethod', 'DELETE'), // allow user to override delete method |
monkeyci
reviewed
Nov 11, 2016
| * | ||
| * The request's promise can be accessed using the `$asPromise` method. | ||
| * The request's promise can be accessed using the `$asPromise` method. It is posible to change | ||
| * the methods used for DELETE operations by setting the `deleteMethod` configuration. |
monkeyci
reviewed
Nov 11, 2016
| * @description Begin a server request to destroy the resource. | ||
| * | ||
| * The request's promise can be accessed using the `$asPromise` method. | ||
| * The request's promise can be accessed using the `$asPromise` method. It is posible to change |
monkeyci
reviewed
Nov 11, 2016
|
|
||
| request = { method: 'POST', url: url, data: this.$wrap(Utils.CREATE_MASK) }; | ||
| request = { | ||
| method: this.$type.getProperty('postMethod', 'POST'), // allow user to override post method |
monkeyci
reviewed
Nov 11, 2016
| } else { | ||
| request = { method: 'PUT', url: url, data: this.$wrap(Utils.UPDATE_MASK) }; | ||
| request = { | ||
| method: this.$type.getProperty('putMethod', 'PUT'), // allow user to override put method |
monkeyci
reviewed
Nov 11, 2016
| * @description Shortcut method used to extend and save a model. | ||
| * | ||
| * This method will not force a PUT, if object is new `$update` will attempt to POST. | ||
| * It is posible to change the methods used for PUT and POST operations by setting |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I had to send different HTTP methods instead if PUT/POST/DELETE so I made it as configurable options in this branch. You can have a look at the changes if they are merge-able. I have updated doc blocks as well.