hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Saravanakumar Selvaraj (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCLIENT-1828) HttpDelete does not extend HttpEntityEnclosingRequestBase
Date Wed, 01 Mar 2017 20:49:45 GMT

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15891009#comment-15891009

Saravanakumar Selvaraj commented on HTTPCLIENT-1828:

bq. How do you DELETE a collection of items in REST anyway?

I would like to clarify that I am not creating a REST service but trying to create a client
for a DELETE method that has body. But unfortunately it seems like it is not possible, to
set HttpEntity to a Method that does not extend {{HttpEntityEnclosingRequestBase}}, in Apache
http client framework.

bq. Why should we? It is trivial to subclass {{HttpEntityEnclosingRequestBase}} and create
a custom {{DELETE}} method implementation for those who think they need it.

I am not sure why this is not allowed in 4.5.x and the same is allowed in 5.x although the
page at [httpcomponents|http://hc.apache.org/httpcomponents-client-ga] says both are an implementation
of HTTP 1.0 and 1.1. It would be great if the framework takes care of creating a client in
such a way rather than I implement the logic of my own.

> HttpDelete does not extend HttpEntityEnclosingRequestBase
> ---------------------------------------------------------
>                 Key: HTTPCLIENT-1828
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1828
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>    Affects Versions: 4.5.1, 4.5.2, 4.5.3
>            Reporter: Saravanakumar Selvaraj
>             Fix For: 5.0 Alpha1
> Sending body in DELETE is allowed as the HTTP 1.1 specification does not forbid. Hence
HttpDelete.class should extend from HttpEntityEnclosingRequestBase instead of HttpRequestBase.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org

View raw message