hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: How to implement httpPatch in httpCLient 4.1.3
Date Tue, 21 Feb 2017 20:23:38 GMT
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


Mime
View raw message