我的应用程序中有下一个端点:
@GetMapping(value = "/users")
public Mono<ServerResponse> users() {
Flux<User> flux = Flux.just(new User("id"));
return ServerResponse.ok()
.contentType(APPLICATION_JSON)
.body(flux, User.class)
.onErrorResume(CustomException.class, e -> ServerResponse.notFound().build());
}
目前,我可以在 Postman 中将文本"data:"
视为正文Content-Type →text/event-stream
。据我了解Mono<ServerResponse>
,总是用SSE(Server Sent Event)
. 是否可以在 Postman 客户端中以某种方式查看响应?