Questions tagged [http-delete]

DELETE is an HTTP request method used to delete a specified resource on server side.

DELETE is an HTTP method which requests that the origin server delete the resource identified by the request URL. This method may be overridden by human intervention (or other means) on the origin server. The client cannot be guaranteed that the operation has been carried out, even if the status code returned from the origin server indicates that the action has been completed successfully. However, the server should not indicate success unless, at the time the response is given, it intends to delete the resource or move it to an inaccessible location.

A successful response should be 200 (OK) if the response includes a response body describing the status, 202 (Accepted) if the action has not yet been enacted, or 204 (No Content) if the action has been enacted but the response does not include a response body.

If the request passes through a cache and the URL identifies one or more currently cached entities, those entries should be treated as stale. Responses to this method are not cacheable.

References- apache.org, w3.org

536 questions
1
vote
1 answer

How to send list parameter with HTTPDELETE as RequestBody in java

Hi i have written a rest service to delete multiple files and i am trying to access the rest service. My input to rest service will be List values which will be id of files that needs to be deleted. For that i have written the below code …
krishna
  • 343
  • 2
  • 5
  • 19
1
vote
1 answer

PHP: obtain HTTP delete request data

I am using a .php file to handle an HTTP delete request, and I would like to access the data sent with the delete request. I know the standard way to do this right now is: parse_str(file_get_contents('php://input'),$_DELETE); Then one can access…
NoobCoder
  • 11
  • 2
1
vote
1 answer

Trying to create delete button dynamically and call delete function in javascript

The idea for this page is to load the 'skills' from my java application and dynamically create a Delete button that allows me to delete those 'skills' from the application. Error received when attempting to click the button to delete a…
1
vote
1 answer

How to secure DELETE request in node express to prevent injection?

I have a form in which someone could upload a file, and then undo if they don't want it anymore. I want to send a request to the server to delete the file, but I'm afraid the user might send ../../lorem/ipsum/. I have a csrf token in the header and…
yaserso
  • 2,638
  • 5
  • 41
  • 73
1
vote
1 answer

protect_from_forgery does not protect PUT/DELETE requests

I made a demo application with rails new demo and then generated a scaffolded user controller with rails generate scaffold User name:string email:string. The scaffolded code has an ApplicationController with protect_from_forgery, so does…
niedakh
  • 2,819
  • 2
  • 20
  • 19
1
vote
2 answers

What does the MarkLogic out of the box rest api return when deleting a document fails?

The MarkLogic documentation gives information for a success response, but no information for a failed delete. https://docs.marklogic.com/REST/DELETE/v1/documents I would expect a 404 if the document doesn't exist, a 410 if it's already been deleted,…
TravisChambers
  • 526
  • 4
  • 12
1
vote
1 answer

how do i do a delete request from api? - flutter

I know how to do get and post request but im unsure on how to do delete request? my json url and it's requirements: String url = "http://35.186.145.243:8080/users"; { "userId":"user1", "price":"$1.300" } so i need to pass userId and price as…
irongirl
  • 895
  • 7
  • 14
  • 31
1
vote
0 answers

What's the difference between a Google Apps Script fetch POST request and a browser-initiated POST request?

I'm using a third-party API and my POST request works as expected when I send from the API documentation "test" page in my browser, or from the Postman Windows native app. I get error codes when I send the same request from Google Apps Script. I am…
1
vote
0 answers

How to delete elements in a json file with Restful API in Java?

Hello I am relative new in Java Programming and I'm kinda struggling with the Restful API. I have a json file which is accessible via an URL-Link. { "incident": [ { "id": 1, "name": "Fire", "text": "Fire burns the whole Street, come fast!", …
1
vote
2 answers

JAVA Delete API with Array String Body

Sorry in advance for my googled english, I work with an API and I make a JAVA software that allows to use it. I need to make a DELETE and the software. I have to perform a deletion, and with the supplied software to test the API, I am shown that I…
Mangue Sutcliff
  • 1,429
  • 1
  • 12
  • 16
1
vote
3 answers

Laravel API, how to accept DELETE method

I need to use my API to delete some entities, I create my controller, my methods, the routes. They works fine, all the get and put/patch method works, but with the delete one I have and error throw by my Angular app who consume this api, here is the…
Spialdor
  • 1,475
  • 5
  • 20
  • 46
1
vote
1 answer

blazegraph delete with query deletes entire namespace rather than just construct results

I am issuing a DELETE REST call to my local blazegraph: http://localhost:9999/blazegraph/namespace/GraphInfo with the body: PREFIX rsabox: PREFIX rstbox: CONSTRUCT { ?result…
wnm3
  • 381
  • 3
  • 17
1
vote
1 answer

Http.delete TypeError: error.json is not a function

In my angular app I have a delete button. Upon click it shows a popup screen to ask the user if he is sure he wants to delete this. When he clicks 'yes' I send the following http.delete request to the backend. Delete(id: number) { return…
Haraldur
  • 227
  • 1
  • 3
  • 16
1
vote
1 answer

redirection after 'delete' in express

From the client side, I am making an Ajax request of type "delete" using jquery.On the server side, I am doing res.redirect(URL).But instead of redirecting, browser is again making a delete request with URL returned from server side for…
ashish7249
  • 269
  • 3
  • 7
1
vote
3 answers

What is the most simplest way of implementing a DELETE request using axios?

I have been unsuccessful in trying to figure out how to solve the following errors, (1st error:)'OPTIONS http://localhost:3000/lists/5a9dca48cebb5a4e5fc1bfe9 404 (Not Found)' and (2nd error:)'Failed to load…
Tj895
  • 56
  • 2
  • 8