cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Help required on data option usage with DELETE - curl -X DELETE -d data='{"name":"test"}'

From: Prasanna Viswakumar <pviswaku_at_yahoo.com>
Date: Sat, 21 Sep 2013 00:12:14 -0700 (PDT)

HI Daniel, Team

Thanks for the responses.

I have been looking at the CURL code available at git.

I see that the code sets the CUSTOMREQUEST option and the postdatafields as well
for this purpose of sending DELETE with the data-body. With the call to
multi_easy_perform(), do we just copy the header first to a data-buffer, place the
data-body following the header and send it as a DELETE request based on the
CUSTOMREQUEST option ? With packet-captures, I do see that the request goes
out as DELETE, but just wanted to confirm if this is the case. Please confirm.

Best
Prasanna, V

--------------------------------------------
On Sat, 9/21/13, Daniel Stenberg <daniel_at_haxx.se> wrote:

 Subject: Re: Help required on data option usage with DELETE - curl -X DELETE -d data='{"name":"test"}'
 To: "libcurl development" <curl-library_at_cool.haxx.se>
 Date: Saturday, September 21, 2013, 2:17 AM
 
 On Fri, 20 Sep 2013, Prasanna
 Viswakumar wrote:
 
 [HTTP request cut out]
>
> How does CURL manage to achieve this ?
 
 It tells libcurl to do such a request! Seriously though,
 there's nothing strange in there and anything speaking TCP
 could be made to send that.
 
> Is it possible to get this ported to Java with the use
 of any of the Apache HTTP client libraries ?
 
 I would assume you can, but this is quite likely not a good
 place to ask that question - we're kind of focused on
 libcurl here. Surely there are much more suitable Apache
 HTTP client forums or lists to ask that question!
 
 --
  / daniel.haxx.se
 -------------------------------------------------------------------
 List admin: http://cool.haxx.se/list/listinfo/curl-library
 Etiquette:  http://curl.haxx.se/mail/etiquette.html
 

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-09-21