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 "Khare, Aparna" <ap...@sap.com> on 2017/02/20 13:14:15 UTC

How to implement httpPatch in httpCLient 4.1.3

Dear Users,

  I have a requirement where I want to implement HTTPPatch method. The problem is we are still on httpClient 4.1.3 which does not have a default method for PATCH.

I need help if there are ways I can do the same.

Looking forward to the experts.

Thanks,
Aparna

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


Re: How to implement httpPatch in httpCLient 4.1.3

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Mon, 2017-02-20 at 13:14 +0000, Khare, Aparna wrote:
> Dear Users,
> 
> � I have a requirement where I want to implement HTTPPatch method.
> The problem is we are still on httpClient 4.1.3 which does not have a
> default method for PATCH.
> 
> I need help if there are ways I can do the same.
> 
> Looking forward to the experts.
> 

---
public class HttpPatch extends HttpEntityEnclosingRequestBase {

    public HttpPatch() {
        super();
    }

    public HttpPatch(final URI uri) {
        super();
        setURI(uri);
    }

    public HttpPatch(final String uri) {
        super();
        setURI(URI.create(uri));
    }


    @Override
    public String getMethod() {
        return "PATCH";
    }
}
---

Hope this helps

Oleg

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