Skip to content

Commit 15940ce

Browse files
committed
Added empty payload note to remove() docs
Not knowing this particular information caused a coworker and I to spend 4 or 5 hours trying to figure out why Chrome was refusing to make the remove request. Long story short, the issue I linked to (mgonto#193) helped solve the problem w/o using the $http workaround
1 parent 9b87589 commit 15940ce

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ These are the methods that can be called on the Restangular object.
689689
* **getList(subElement, [queryParams, headers])**: Gets a nested resource. subElement is mandatory. **It's a string with the name of the nested resource (and URL)**. For example `buildings`
690690
* **put([queryParams, headers])**: Does a put to the current element
691691
* **post(subElement, elementToPost, [queryParams, headers])**: Does a POST and creates a subElement. Subelement is mandatory and is the nested resource. Element to post is the object to post to the server
692-
* **remove([queryParams, headers])**: Does a DELETE
692+
* **remove([queryParams, headers])**: Does a DELETE. By default, `remove` sends a request with an empty object, which may cause problems with some servers or browsers. [This](https://github.com/mgonto/restangular/issues/193) shows how to configure RESTangular to have no payload.
693693
* **head([queryParams, headers])**: Does a HEAD
694694
* **trace([queryParams, headers])**: Does a TRACE
695695
* **options([queryParams, headers])**: Does a OPTIONS
@@ -715,7 +715,7 @@ These are the methods that can be called on the Restangular object.
715715
* **trace: ([queryParams, headers])**: Does a TRACE
716716
* **options: ([queryParams, headers])**: Does a OPTIONS
717717
* **patch(object, [queryParams, headers])**: Does a PATCH
718-
* **remove([queryParams, headers])**: Does a DELETE
718+
* **remove([queryParams, headers])**: Does a DELETE. By default, `remove` sends a request with an empty object, which may cause problems with some servers or browsers. [This](https://github.com/mgonto/restangular/issues/193) shows how to configure RESTangular to have no payload.
719719
* **putElement(idx, params, headers)**: Puts the element on the required index and returns a promise of the updated new array
720720
* **getRestangularUrl()**: Gets the URL of the current object.
721721
* **getRequestedUrl()**: Gets the real URL the current object was requested with (incl. GET parameters). Will equal getRestangularUrl() when no parameters were used, before calling `getList()`, or when using on a nested child.

0 commit comments

Comments
 (0)