You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2012/11/19 18:15:43 UTC
svn commit: r1411314 - in /cxf/branches/2.6.x-fixes: ./
rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java
Author: sergeyb
Date: Mon Nov 19 17:15:42 2012
New Revision: 1411314
URL: http://svn.apache.org/viewvc?rev=1411314&view=rev
Log:
Merged revisions 1409750 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1409750 | sergeyb | 2012-11-15 12:19:54 +0000 (Thu, 15 Nov 2012) | 1 line
Adding two more methods for supporting PUT to WebClient
........
Modified:
cxf/branches/2.6.x-fixes/ (props changed)
cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java
Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
Merged /cxf/trunk:r1409750
Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java?rev=1411314&r1=1411313&r2=1411314&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java (original)
+++ cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java Mon Nov 19 17:15:42 2012
@@ -371,6 +371,17 @@ public class WebClient extends AbstractC
}
/**
+ * Does HTTP PUT invocation and returns typed response object
+ * @param body request body, can be null
+ * @param responseClass expected type of response object
+ * @return typed object, can be null. Response status code and headers
+ * can be obtained too, see Client.getResponse()
+ */
+ public <T> T put(Object body, Class<T> responseClass) {
+ return invoke("PUT", body, responseClass);
+ }
+
+ /**
* Does HTTP invocation and returns a collection of typed objects
* @param httpMethod HTTP method
* @param body request body, can be null