From d16152c10fa4b1d66d969f15d24ef88d3b3d1a9d Mon Sep 17 00:00:00 2001 From: Oleg Kalnichevski Date: Thu, 8 Jan 2015 14:04:04 +0000 Subject: [PATCH] RequestBuilder add Patch support git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1650292 13f79535-47bb-0310-9956-ffa450edef68 --- .../http/client/methods/RequestBuilder.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/httpclient/src/main/java/org/apache/http/client/methods/RequestBuilder.java b/httpclient/src/main/java/org/apache/http/client/methods/RequestBuilder.java index a8e4de204..763bcb511 100644 --- a/httpclient/src/main/java/org/apache/http/client/methods/RequestBuilder.java +++ b/httpclient/src/main/java/org/apache/http/client/methods/RequestBuilder.java @@ -142,6 +142,27 @@ public class RequestBuilder { return new RequestBuilder(HttpHead.METHOD_NAME, uri); } + /** + * @since 4.4 + */ + public static RequestBuilder patch() { + return new RequestBuilder(HttpPatch.METHOD_NAME); + } + + /** + * @since 4.4 + */ + public static RequestBuilder patch(final URI uri) { + return new RequestBuilder(HttpPatch.METHOD_NAME, uri); + } + + /** + * @since 4.4 + */ + public static RequestBuilder patch(final String uri) { + return new RequestBuilder(HttpPatch.METHOD_NAME, uri); + } + public static RequestBuilder post() { return new RequestBuilder(HttpPost.METHOD_NAME); }