users@jersey.java.net

[Jersey] Re: Sending a PATCH request from JAX-RS client?

From: Craig McClanahan <craigmcc_at_gmail.com>
Date: Thu, 9 Apr 2015 12:49:52 -0700

When I had a similar problem recently, I chose to have my server implement
HttpMethodOverrideFilter (from Jersey) so that lame (non-PATCH-capable)
clients could send an X-HTTP-Method-Override header and do a POST. Clients
that do understand how to PATCH can still do it.

Craig


On Thu, Apr 9, 2015 at 10:13 AM, Simon Roberts <
simon_at_dancingcloudphotography.com> wrote:

> Thanks Markus,
>
> That pushed my search a little further, and eventually I found that Jersey
> has a (seemingly undocumented?) feature for this:
>
> client.property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true);
>
> Seems to solve this adequately. Weird that it doens't appear to show up in
> the docs. Perhaps PATCH isn't all that common?
>
> Cheers,
> Simon
>
>
> Subject: [Jersey] Re: Sending a PATCH request from JAX-RS client?
>>
>> See
>> https://blogs.oracle.com/PavelBucek/entry/jersey_client_making_requests_with
>> but AFAIK the name of the property was changed meanwhile.
>>
>>
>>
>> Regards
>>
>> -Markus
>>
>>
>>