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.

httpDelete did not send body payload

See original GitHub issue

Fuel: v1.12.0

I tried to sent HTTP DELETE with JSON body. I checked HttpClient.kt that it skip body set up for GET, DELETE, HEAD

private fun setDoOutput(connection: HttpURLConnection, method: Method) = when (method) {
   Method.GET, Method.DELETE, Method.HEAD -> connection.doOutput = false
   Method.POST, Method.PUT, Method.PATCH -> connection.doOutput = true
}

Should we allow Method.DELETE? Because I have scenario that API need body payload for DELETE.

Same issue #245

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:32 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
iNolescommented, Nov 6, 2018

I noticed curl response contained HTTP/2 200. I don’t know HttpUrlConnection able to support HTTP/2.

2reactions
markGilchristcommented, Aug 22, 2018

@babedev @simonharrer @kittinunf @SleeplessByte @kmcgill88

Guys I am going to pick this up I have opened a WIP Pr (https://github.com/kittinunf/Fuel/pull/417)

I would really appreciate your feedback and reviews.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is an entity body allowed for an HTTP DELETE request?
A client SHOULD NOT generate content in a DELETE request unless it is ... So while clients can send the payload body, servers...
Read more >
HTTP Delete Rest service with request body as payload
Request for this service will be passed by source application in request body as payload and not in query parameters.
Read more >
REST - Should you use a body for your HTTP DELETE ...
The RFC states that: A payload within a DELETE request message has no defined semantics; sending a payload body on a DELETE request...
Read more >
What is HTTP DELETE Request Method? - ReqBin
Sending a message body on a DELETE request might cause some servers to reject the request. But you still can send data to...
Read more >
cURL: DELETE request examples - Marc Nuri
HTTP DELETE request with data. Sending a payload body with a DELETE request is something discouraged and not recommended.
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