diff options
author | mmis <michael.morris@ericsson.com> | 2018-08-30 13:34:55 +0100 |
---|---|---|
committer | mmis <michael.morris@ericsson.com> | 2018-08-30 13:39:26 +0100 |
commit | ef849e64bc904f729bace1fb2c43f8cf34de3dd5 (patch) | |
tree | 8879ae092ef1af626bce444fc486fa3076596a99 /policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/RestEchoService.java | |
parent | 5443573fe9f8a183f968aa63d08dc3543e73c305 (diff) |
Add support for http PUT
Added support for http PUT for use by the policy forwarder in
policy/distribution
Issue-ID: POLICY-926
Change-Id: Ifa5c2e8be0582797936b95b772ad236f35c10f24
Signed-off-by: mmis <michael.morris@ericsson.com>
Diffstat (limited to 'policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/RestEchoService.java')
-rw-r--r-- | policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/RestEchoService.java | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/RestEchoService.java b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/RestEchoService.java index fdb8770c..56ed8933 100644 --- a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/RestEchoService.java +++ b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/RestEchoService.java @@ -22,12 +22,15 @@ package org.onap.policy.common.endpoints.http.server.test; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; + import javax.ws.rs.GET; +import javax.ws.rs.PUT; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; + @Api(value = "echo") @Path("/junit/echo") public class RestEchoService { @@ -35,11 +38,17 @@ public class RestEchoService { @GET @Path("{word}") @Produces(MediaType.TEXT_PLAIN) - @ApiOperation( - value = "echoes back whatever received" - ) - public String echo(@PathParam("word") String word) { + @ApiOperation(value = "echoes back whatever received") + public String echo(@PathParam("word") String word) { return word; } + @PUT + @Path("{word}") + @Produces(MediaType.TEXT_PLAIN) + @ApiOperation(value = "echoes back whatever received") + public String echoPut(@PathParam("word") String word, Object entity) { + return word + ":" + entity.toString(); + } + } |