Hi

I'm trying to interact with a restful API using httpclient,

I'm using 4.3.6 of httpclient and most of my code looks like:
RequestBuilder.post()
     .setUri(endpoint)
     .addHeader(HttpHeaders.CONTENT_TYPE, "application/json")
     .setEntity(httpEntity)
     .build();
Or get or put...

I found that I could use HttpPatch like so:
HttpEntityEnclosingRequestBase request = new HttpPatch(endpoint);
            request.setEntity(httpEntity);
            request.setHeader(HttpHeaders.CONTENT_TYPE, "application/json");

Is there a reason why PATCH isn't on the request builder?


Thanks

Tim Jacomb

Reply via email to