hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1617683 - /httpcomponents/httpclient/trunk/fluent-hc/src/main/java/org/apache/http/client/fluent/Request.java
Date Wed, 13 Aug 2014 08:32:07 GMT
Author: olegk
Date: Wed Aug 13 08:32:07 2014
New Revision: 1617683

URL: http://svn.apache.org/r1617683
Log:
Ddded Patch request support to HC fluent

Modified:
    httpcomponents/httpclient/trunk/fluent-hc/src/main/java/org/apache/http/client/fluent/Request.java

Modified: httpcomponents/httpclient/trunk/fluent-hc/src/main/java/org/apache/http/client/fluent/Request.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/fluent-hc/src/main/java/org/apache/http/client/fluent/Request.java?rev=1617683&r1=1617682&r2=1617683&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/fluent-hc/src/main/java/org/apache/http/client/fluent/Request.java
(original)
+++ httpcomponents/httpclient/trunk/fluent-hc/src/main/java/org/apache/http/client/fluent/Request.java
Wed Aug 13 08:32:07 2014
@@ -52,6 +52,7 @@ import org.apache.http.client.methods.Ht
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.client.methods.HttpHead;
 import org.apache.http.client.methods.HttpOptions;
+import org.apache.http.client.methods.HttpPatch;
 import org.apache.http.client.methods.HttpPost;
 import org.apache.http.client.methods.HttpPut;
 import org.apache.http.client.methods.HttpTrace;
@@ -94,6 +95,14 @@ public class Request {
         return new Request(new InternalEntityEnclosingHttpRequest(HttpPost.METHOD_NAME, URI.create(uri)));
     }
 
+    public static Request Patch(final URI uri) {
+        return new Request(new InternalEntityEnclosingHttpRequest(HttpPatch.METHOD_NAME,
uri));
+    }
+
+    public static Request Patch(final String uri) {
+        return new Request(new InternalEntityEnclosingHttpRequest(HttpPatch.METHOD_NAME,
URI.create(uri)));
+    }
+
     public static Request Put(final URI uri) {
         return new Request(new InternalEntityEnclosingHttpRequest(HttpPut.METHOD_NAME, uri));
     }



Mime
View raw message