Rectangular DELETE request, sending data in the body


Sergey Tyupaev

I am using restangular to send DELETE request. I send some data in the request and add the data to the query string. But I want to use body instead of URI. I found this question on stackoverflow . This problem can be solved by using methods , Mgunto said . I have tried something like this:customDELETE

Restangular.all("all").customDELETE("one", {
firstParam: 1,
secondParam: 2
});

Unfortunately, the parameters are still sent in the URI. Is there any way I can send parameters in the body? Like in a POST request?

Sergey Tyupaev

My team lead helped me find a solution! We can use to customOperationsend data in the request body. Here is an example:

Restangular.all("all/one").customOperation("remove", null, null, {
firstParam: 1,
secondParam: 2
});

This works for me! Hope it helps others!

Related


Rectangular DELETE request, sending data in the body

Sergey Tyupaev I am using restangular to send DELETE request. I send some data in the request and add the data to the query string. But I want to use body instead of URI. I found this question on stackoverflow . This problem can be solved by using methods , Mg

Rectangular DELETE request, sending data in the body

Sergey Tyupaev I am using restangular to send DELETE request. I send some data in the request and add the data to the query string. But I want to use body instead of URI. I found this question on stackoverflow . This problem can be solved by using methods , Mg

Rectangular DELETE request, sending data in the body

Sergey Tyupaev I am using restangular to send DELETE request. I send some data in the request and add the data to the query string. But I want to use body instead of URI. I found this question on stackoverflow . This problem can be solved by using methods , Mg

Pass data in the body of the DELETE request

Alex I have two Spring MVC controller methods. Both receive the same data in the request body (in the POSTform of HTLM: version=3&name=product1&id=2), but one method handles the PUTrequest and the other DELETE: @RequestMapping(value = "ajax/products/{id}", met

Pass data in the body of the DELETE request

Alex I have two Spring MVC controller methods. Both receive the same data in the request body (in the POSTform of HTLM: version=3&name=product1&id=2), but one method handles the PUTrequest and the other DELETE: @RequestMapping(value = "ajax/products/{id}", met

Pass data in the body of the DELETE request

Alex I have two Spring MVC controller methods. Both receive the same data in the request body (in the POSTform of HTLM: version=3&name=product1&id=2), but one method handles the PUTrequest and the other DELETE: @RequestMapping(value = "ajax/products/{id}", met

Pass data in the body of the DELETE request

Alex I have two Spring MVC controller methods. Both receive the same data in the request body (in the POSTform of HTLM: version=3&name=product1&id=2), but one method handles the PUTrequest and the other DELETE: @RequestMapping(value = "ajax/products/{id}", met

$http.get not sending data in request body

winner While using angular v1.3.1, I'm having the following problem trying to implement a facade for making http requests to a REST+JSON interface in the backend of a web application. I get something like this in the code: findSomething(value: number): ng.IPro

$http.get not sending data in request body

winner While using angular v1.3.1, I'm having the following problem trying to implement a facade for making http requests to a REST+JSON interface in the backend of a web application. I get something like this in the code: findSomething(value: number): ng.IPro

$http.get not sending data in request body

winner While using angular v1.3.1, I'm having the following problem trying to implement a facade for making http requests to a REST+JSON interface in the backend of a web application. I get something like this in the code: findSomething(value: number): ng.IPro

$http.get not sending data in request body

winner While using angular v1.3.1, I'm having the following problem trying to implement a facade for making http requests to a REST+JSON interface in the backend of a web application. I get something like this in the code: findSomething(value: number): ng.IPro

$http.get not sending data in request body

winner While using angular v1.3.1, I'm having the following problem trying to implement a facade for making http requests to a REST+JSON interface in the backend of a web application. I get something like this in the code: findSomething(value: number): ng.IPro

AngularJS $resource DELETE not passing data in request body

Rory Ferino I have the following code: deleteArticle = function(assetData) { var defer; var assetId = assetData.assetId; var cseService = $resource(CSE_CONFIG.apiBaseUrl + 'articles/' + assetId,{}, {'remove': {method: 'DELETE', isArray: false}});

Unable to get request body by resify sending data using Postman

Derek I am using Restify server (node version is v9.11.1, restify version is 6.4.0). Here is my server configuration: server.use(restify.plugins.queryParser({ mapParams: true })) server.use(restify.plugins.bodyParser({ mapParams: true })); server.pre(restify

Why is the request not sending data?

Baek Seung Hyun I just made the server. The server returns raw data. So when I use Restlet Client in Chrome Extension to Server I can return json post data. However, the Python Requests module does not return. I do requestsn't think data is sent. Python 3.6.8

Why is the request not sending data?

Baek Seung Hyun I just made the server. The server returns raw data. So when I use Restlet Client in Chrome Extension to Server I can return json post data. However, the Python Requests module does not return. I do requestsn't think data is sent. Python 3.6.8

Why is the request not sending data?

Baek Seung Hyun I just made the server. The server returns raw data. So when I use Restlet Client in Chrome Extension to Server I can return json post data. However, the Python Requests module does not return. I do requestsn't think data is sent. Python 3.6.8

Java HTTP DELETE with request body

DXB King I have an external API which uses DELETE with body (JSON). I utilize Postman REST Client and do delete via request body and it works fine. I am trying to use a method to automate this function. I tried using HttpURLConnection for similar GET, POST and

Laravel DELETE method with request body

username I've been trying to add a with rule and a message to FormRequestmy delete method , but the request returns empty and the rule fails every time. Is it possible to get request data through delete method? Here is my request class: use App\Http\Requests\R

Java HTTP DELETE with request body

DXB King I have an external API which uses DELETE with body (JSON). I utilize Postman REST Client and do delete via request body and it works fine. I am trying to use a method to automate this function. I tried using HttpURLConnection for similar GET, POST and

Laravel DELETE method with request body

username I've been trying to add a with rule and a message to FormRequestmy delete method , but the request returns empty and the rule fails every time. Is it possible to get request data through delete method? Here is my request class: use App\Http\Requests\R

Java HTTP DELETE with request body

DXB King I have an external API which uses DELETE with body (JSON). I utilize Postman REST Client and do delete via request body and it works fine. I am trying to use a method to automate this function. I tried using HttpURLConnection for similar GET, POST and

Java HTTP DELETE with request body

DXB King I have an external API which uses DELETE with body (JSON). I utilize Postman REST Client and do delete via request body and it works fine. I am trying to use a method to automate this function. I tried using HttpURLConnection for similar GET, POST and

Java HTTP DELETE with request body

DXB King I have an external API which uses DELETE with body (JSON). I utilize Postman REST Client and do delete via request body and it works fine. I am trying to use a method to automate this function. I tried using HttpURLConnection for similar GET, POST and

Laravel DELETE method with request body

username I've been trying to add a with rule and a message to FormRequestmy delete method , but the request returns empty and the rule fails every time. Is it possible to get request data through delete method? Here is my request class: use App\Http\Requests\R