0

In an HTTP GET request, all data is found in the URL.

In an HTTP POST request, all data is found within the HTTP body.

Where is the data in a DELETE or PUT request?

1

2 Answers 2

1

Put simply, as far as passing data with your call goes:

  • DELETE should follow the same guidelines as GET
  • PUT should follow the same guidelines as POST
Sign up to request clarification or add additional context in comments.

Comments

1

From the RFC 7231:

4.3.5. DELETE

[...] A payload within a DELETE request message has no defined semantics; sending a payload body on a DELETE request might cause some existing implementations to reject the request.

4.3.4. PUT

The PUT method requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload. [...]


For both methods, you can send data in the URL using path / matrix and query parameters.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.