Re: RFE: Add PATCH to the list of the supported HTTP methods

2018-03-12 Thread Chris Hegarty

On 07/03/18 08:36, Andrej Golovnin wrote:

Hi Chris,


The JDK HTTP Client has:
   `HttpRequest.Builder::method(String method, BodyPublisher publisher)`

  ,so it is currently possible to use the `PATCH` method.

Is `PATCH` sufficiently popular to warrant its own self-named
method in the request builder?


I don't know how popular is it. We have just started to use it with
one of our services and discovered that we cannot use it with
HttpURLConnection at all. And I thought when we add the support for
PATCH to HttpURLConnection, then it would be nice to have it in HTTP
Client too. When you decided not to add it to HTTP Client, then it is
OK for me too. But I think that HttpURLConnection should be changed.


I'm not opposed adding support for PATCH to HttpURLConnection.
You will need to add a test, and I think a CSR to add it to
list of supported methods.

-Chris.


Re: RFE: Add PATCH to the list of the supported HTTP methods

2018-03-07 Thread Andrej Golovnin
Hi Chris,

> The JDK HTTP Client has:
>   `HttpRequest.Builder::method(String method, BodyPublisher publisher)`
>
>  ,so it is currently possible to use the `PATCH` method.
>
> Is `PATCH` sufficiently popular to warrant its own self-named
> method in the request builder?

I don't know how popular is it. We have just started to use it with
one of our services and discovered that we cannot use it with
HttpURLConnection at all. And I thought when we add the support for
PATCH to HttpURLConnection, then it would be nice to have it in HTTP
Client too. When you decided not to add it to HTTP Client, then it is
OK for me too. But I think that HttpURLConnection should be changed.

Best regards,
Andrej Golovnin


Re: RFE: Add PATCH to the list of the supported HTTP methods

2018-03-06 Thread James Roper
I don't have any opinion on the matter, but a datapoint to the popularity
of PATCH is its use in the GitHub API:

https://developer.github.com/v3/

GitHub is often looked to as a gold standard for how to write a REST API,
so if they do it, it's likely that many others do too.

On 7 March 2018 at 05:40, Chris Hegarty  wrote:

> Hi Andrej,
>
> On 02/03/18 08:28, Andrej Golovnin wrote:
>
>> Hi all,
>>
>> it would be nice if could add PATCH
>> (https://tools.ietf.org/html/rfc5789) to the list of the supported
>> ...
>> - and one for the HTTP Client branch in the JDK sandbox repository
>> which adds PATCH to the HttpRequest builder:
>>java_net_http_HttpRequest_PATCH_method.diff
>>
>
> The JDK HTTP Client has:
>   `HttpRequest.Builder::method(String method, BodyPublisher publisher)`
>
>  ,so it is currently possible to use the `PATCH` method.
>
> Is `PATCH` sufficiently popular to warrant its own self-named
> method in the request builder?
>
> -Chris.
>



-- 
*James Roper*
*Senior Octonaut*

Lightbend  – Build reactive apps!
Twitter: @jroper 


Re: RFE: Add PATCH to the list of the supported HTTP methods

2018-03-06 Thread Chris Hegarty

Hi Andrej,

On 02/03/18 08:28, Andrej Golovnin wrote:

Hi all,

it would be nice if could add PATCH
(https://tools.ietf.org/html/rfc5789) to the list of the supported
...
- and one for the HTTP Client branch in the JDK sandbox repository
which adds PATCH to the HttpRequest builder:
   java_net_http_HttpRequest_PATCH_method.diff


The JDK HTTP Client has:
  `HttpRequest.Builder::method(String method, BodyPublisher publisher)`

 ,so it is currently possible to use the `PATCH` method.

Is `PATCH` sufficiently popular to warrant its own self-named
method in the request builder?

-Chris.


RFE: Add PATCH to the list of the supported HTTP methods

2018-03-02 Thread Andrej Golovnin
Hi all,

it would be nice if could add PATCH
(https://tools.ietf.org/html/rfc5789) to the list of the supported
HTTP methods in the HttpURLConnection class.

I have attached two patches:

- one for the HttpURLConnection class:
  java_net_HttpURLConnection_PATCH_method.diff

- and one for the HTTP Client branch in the JDK sandbox repository
which adds PATCH to the HttpRequest builder:
  java_net_http_HttpRequest_PATCH_method.diff

Best regards,
Andrej Golovnin


java_net_HttpURLConnection_PATCH_method.diff
Description: Binary data


java_net_http_HttpRequest_PATCH_method.diff
Description: Binary data