writeContentType method

  1. @override
void writeContentType(
  1. Response response
)
override

Sets the content type of the response to 'application/x-yaml'.

This method modifies the headers of the response to indicate that the content type is 'application/x-yaml' with UTF-8 character encoding.

response is the HTTP response object whose headers will be modified.

Implementation

@override
void writeContentType(Response response) {
  response.headers.set('Content-Type', 'application/x-yaml; charset=utf-8');
}