Set_content_type

Set_content_type

{% set_content_type %}

Sets the Content-Type header for the HTTP response.

Examples

Set content type by variable

Copy
{% var contenttype = "text/csv" %} {% set_content_type contenttype %}

Set content type by appending string

Copy
{% var contenttype = "csv" %} {% set_content_type "text/" | append: contenttype %}

Set content type with a string

Copy
{% set_content_type "application/xml" %}