Was trying out RSocket Request/Response as specified in section 4 of https://www.baeldung.com/spring-boot-rsocket. So there is a RSocketServer autoconfigured and listening at port 7000. Unable to connect to the method annotated with @GetMapping
when hitting the same from browser
@RestController
public class MarketDataRestController {
private final RSocketRequester rSocketRequester;
public MarketDataRestController(RSocketRequester rSocketRequester) {
this.rSocketRequester = rSocketRequester;
}
@GetMapping(value = "/current/{stock}")
public Publisher<MarketData> current(@PathVariable("stock") String stock) {
return rSocketRequester
.route("currentMarketData")
.data(new MarketDataRequest(stock))
.retrieveMono(MarketData.class);
}
}
Expecting to be able to connect to the current()
of the class MarketDataRestController
annotated with @GetMapping
when requesting the same from browser, say e.g.: http://localhost:7000/current/APPLE.
Not sure how to connect to the same.