You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Philippe Mouawad <ph...@gmail.com> on 2013/07/12 21:15:30 UTC

DELETE with body

Hello,
We have a need to send some body inside DELETE method.

   - https://issues.apache.org/bugzilla/show_bug.cgi?id=55255

The same as :

curl -XDELETE 'http://localhost:9200/twitter/tweet/_query' -d '{
    "term" : { "user" : "kimchy" }
}
'

According to specs, it is possible.

Looking at org.apache.http.client.methods.HttpDelete , it seems it inherits
from org.apache.http.client.methods.HttpRequestBase and not
HttpEntityEnclosingRequestBase.
What is our option to implement it ?

Thanks
Regards
Philippe

Re: DELETE with body

Posted by Philippe Mouawad <ph...@gmail.com>.
Thanks Subhash.

On Sun, Jul 14, 2013 at 4:50 PM, Subhash Chandran <su...@gmail.com> wrote:

> I posted this question sometime back, and Oleg advised me create this
> custom class:
>
>
> https://code.google.com/p/rest-client/source/browse/restclient-lib/src/main/java/org/wiztools/restclient/http/EntityEnclosingDelete.java
>
> Subhash.
>
>
> On Sat, Jul 13, 2013 at 12:45 AM, Philippe Mouawad <
> philippe.mouawad@gmail.com> wrote:
>
> > Hello,
> > We have a need to send some body inside DELETE method.
> >
> >    - https://issues.apache.org/bugzilla/show_bug.cgi?id=55255
> >
> > The same as :
> >
> > curl -XDELETE 'http://localhost:9200/twitter/tweet/_query' -d '{
> >     "term" : { "user" : "kimchy" }
> > }
> > '
> >
> > According to specs, it is possible.
> >
> > Looking at org.apache.http.client.methods.HttpDelete , it seems it
> inherits
> > from org.apache.http.client.methods.HttpRequestBase and not
> > HttpEntityEnclosingRequestBase.
> > What is our option to implement it ?
> >
> > Thanks
> > Regards
> > Philippe
> >
>
>
>
> --
> Subhash Chandran
> Author PHP OOP: Quick & Dirty for Advanced Learners
> http://www.amazon.com/dp/B00CM4ZECG
> Phone: +91 979 102 0238
> Skype & GTalk: subwiz
> http://twitter.com/subwiz | http://www.linkedin.com/in/subwiz
>



-- 
Cordialement.
Philippe Mouawad.

Re: DELETE with body

Posted by Subhash Chandran <su...@gmail.com>.
I posted this question sometime back, and Oleg advised me create this
custom class:

https://code.google.com/p/rest-client/source/browse/restclient-lib/src/main/java/org/wiztools/restclient/http/EntityEnclosingDelete.java

Subhash.


On Sat, Jul 13, 2013 at 12:45 AM, Philippe Mouawad <
philippe.mouawad@gmail.com> wrote:

> Hello,
> We have a need to send some body inside DELETE method.
>
>    - https://issues.apache.org/bugzilla/show_bug.cgi?id=55255
>
> The same as :
>
> curl -XDELETE 'http://localhost:9200/twitter/tweet/_query' -d '{
>     "term" : { "user" : "kimchy" }
> }
> '
>
> According to specs, it is possible.
>
> Looking at org.apache.http.client.methods.HttpDelete , it seems it inherits
> from org.apache.http.client.methods.HttpRequestBase and not
> HttpEntityEnclosingRequestBase.
> What is our option to implement it ?
>
> Thanks
> Regards
> Philippe
>



-- 
Subhash Chandran
Author PHP OOP: Quick & Dirty for Advanced Learners
http://www.amazon.com/dp/B00CM4ZECG
Phone: +91 979 102 0238
Skype & GTalk: subwiz
http://twitter.com/subwiz | http://www.linkedin.com/in/subwiz