package com.apress.spring.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.apress.spring.websocket.Producer;

@RestController
public class WebSocketController {

	@Autowired
	Producer producer;
	
	@RequestMapping("/send/{topic}")
	public String sender(@PathVariable String topic, @RequestParam String message){
		producer.sendMessageTo(topic, message);
		return "{ \"code\": \"OK\" }";
	}
	
}

@@ -640,28 +640,15 @@
 rn %22
-%7B %5C%22code%5C%22: %5C%22OK%5C%22 %7D
+OK-Sent
 %22;%0A%09

update the response