On Tue, 2015-01-06 at 21:46 +0000, Tim Jacomb [DATACOM] wrote: > 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? > >
No reason. Feel free to raise a PR on GitHub or an enhancement request in Jira. Oleg > Thanks > > Tim Jacomb > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
