On Tue, 2011-02-01 at 15:30 +0100, Grzegorz Szpetkowski wrote:
> Hi,
>
> According to HttpClient Tutorial (1.1.1. HTTP request) there is
> support for methods: GET, HEAD, POST, PUT, DELETE, TRACE and OPTIONS.
> How I can make request using PATCH (RFC 5789) method or CONNECT ?
You ought not execute CONNECT requests directly and let HttpClient take
care of connection tunneling.
> I
> choosed Apache HttpClient library because I throught it provides much
> more flexibility than JDK HttpURLConnection.
>
> I found there is one way to make new class, wchich extends one off
> supported method (e.g. POST):
>
> class HttpPatch extends HttpPost {
> public final static String METHOD_NAME = "PATCH";
>
> public HttpPatch(final String uri) {
> super(uri);
> }
>
> public String getMethod() {
> return "PATCH";
> }
> }
>
> Is this "correct" way ?
>
Yes, it is.
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]