question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DELETE request drops the body

See original GitHub issue

It looks like for a DELETE request the body is not parsed.

I looked at the history but couldn’t figure out if there was a reason why for a DELETE the body is not parsed/matched?

I am writing tests that depend on the DELETE request sending a body and this makes it tricky to test.

The fix can be as easy as flipping this to true, however I am not sure what the side effects could be. https://github.com/WireMock-Net/WireMock.Net/blob/master/src/WireMock.Net/Util/BodyParser.cs#L36

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
StefHcommented, Oct 22, 2019

Thank you for testing this. I will merge this PR to master, keep a watch on the official NuGet packages.

0reactions
AlexGhiondeacommented, Oct 22, 2019

@StefH I wasn’t able to get the package from the feed, so I cloned and built locally your PR. With that, the tests that require a body for a DELETE operation work if you specify that setting!

Thanks for making the change! I will update my version once you release!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is an entity body allowed for an HTTP DELETE request?
Yes it is allowed to include a body on DELETE requests, but it's semantically meaningless. What this really means is that issuing a...
Read more >
REST - Should you use a body for your HTTP DELETE ...
According to Mozilla a DELETE request "may" have a body, compared to a PUT, which should have a body. By this it seems...
Read more >
http body dropped when using delete method · Issue #19179
From what I can find, due to this line of code if you make an http request with a delete method the body...
Read more >
Allow request body to be specified for DELETE requests.
The HTTP spec does not explicitly disallow message body content from being specified in DELETE requests, therefor many believe it to be allowed....
Read more >
HTTP GET/DELETE - How to get the body of request using ...
I want to send HTTP GET/DELETE request with body to Mule ESB. However HTTP Listenner Connector(Mule ESB v3.6.1CE) returns status code 400.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found