You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streams.apache.org by ds...@apache.org on 2013/11/20 13:53:27 UTC
svn commit: r1543806 -
/incubator/streams/branches/webservice/streams-web/src/main/java/org/apache/streams/mvc/controller/StreamsWebController.java
Author: dsullivan
Date: Wed Nov 20 12:53:27 2013
New Revision: 1543806
URL: http://svn.apache.org/r1543806
Log:
adding urls
Modified:
incubator/streams/branches/webservice/streams-web/src/main/java/org/apache/streams/mvc/controller/StreamsWebController.java
Modified: incubator/streams/branches/webservice/streams-web/src/main/java/org/apache/streams/mvc/controller/StreamsWebController.java
URL: http://svn.apache.org/viewvc/incubator/streams/branches/webservice/streams-web/src/main/java/org/apache/streams/mvc/controller/StreamsWebController.java?rev=1543806&r1=1543805&r2=1543806&view=diff
==============================================================================
--- incubator/streams/branches/webservice/streams-web/src/main/java/org/apache/streams/mvc/controller/StreamsWebController.java (original)
+++ incubator/streams/branches/webservice/streams-web/src/main/java/org/apache/streams/mvc/controller/StreamsWebController.java Wed Nov 20 12:53:27 2013
@@ -47,9 +47,9 @@ public class StreamsWebController {
*/
@RequestMapping(headers = {"content-type=application/json"}, value = "/publisherRegister", method = RequestMethod.POST)
@ResponseBody
- public ResponseEntity<String> registerPublisher(@RequestBody String payload) {
+ public ResponseEntity<String> registerPublisher(@RequestBody String payload, @RequestHeader("host") String host) {
try {
- return new ResponseEntity<String>(publisherRegistrationService.register(payload), HttpStatus.OK);
+ return new ResponseEntity<String>("http://" + host + "/streams-web/app/postActivity/" + publisherRegistrationService.register(payload), HttpStatus.OK);
} catch (Exception e) {
log.error(e);
return new ResponseEntity<String>(e.getMessage(), HttpStatus.BAD_REQUEST);
@@ -64,9 +64,9 @@ public class StreamsWebController {
*/
@RequestMapping(headers = {"content-type=application/json"}, value = "/subscriberRegister", method = RequestMethod.POST)
@ResponseBody
- public ResponseEntity<String> registerSubscriber(@RequestBody String payload) {
+ public ResponseEntity<String> registerSubscriber(@RequestBody String payload, @RequestHeader("host") String host) {
try {
- return new ResponseEntity<String>(subscriberRegistrationService.register(payload), HttpStatus.OK);
+ return new ResponseEntity<String>("http://" + host + "/streams-web/app/getActivity/" + subscriberRegistrationService.register(payload), HttpStatus.OK);
} catch (Exception e) {
log.error(e);
return new ResponseEntity<String>(e.getMessage(), HttpStatus.BAD_REQUEST);