contentType

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")

Return

This builder instance.

Parameters

contentType

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)

Return

This builder instance.

Parameters

contentType

The content type, e.g. ContentType.Application.Json.