Skip to content

Conversation

@utf4
Copy link

@utf4 utf4 commented Nov 11, 2016

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.

{
var request = { method: 'DELETE', url: url };
var request = {
method: this.$type.getProperty('deleteMethod', 'DELETE'), // allow user to override delete method

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

*
* 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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

* @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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.


request = { method: 'POST', url: url, data: this.$wrap(Utils.CREATE_MASK) };
request = {
method: this.$type.getProperty('postMethod', 'POST'), // allow user to override post method

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

} 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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

* @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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants