content Type
Sets the Content-Type of the streaming response.
The default is text/event-stream; charset=UTF-8. Override when the stream carries a different media type, e.g. application/x-ndjson:
.contentType("application/x-ndjson")Content copied to clipboard
Return
This builder instance.
Parameters
content Type
A content-type string such as "application/x-ndjson".
Sets the Content-Type of the streaming response.
The default is text/event-stream; charset=UTF-8. Override when the stream carries a different media type:
.contentType(ContentType.Application.Json)Content copied to clipboard
Return
This builder instance.
Parameters
content Type
The content type, e.g. ContentType.Application.Json.