Exam >
On this page

Content-Type

To specify Content-Type the contentType attribute may be used. Default is application/json

Examples

default content-type
The following markup:
<e:get url="mirror/request">
  <e:case>
    <e:expected>{ "GET": "/mirror/request" }</e:expected>
  </e:case>
</e:get>
will be rendered as:
GET mirror/request
Content-Type application/json
Use cases:
1)
GET mirror/request HTTP/1.1
200512ms
custom content-type

Specifying Content-Type = text/plain

The following markup:
<e:get url="mirror/request" contentType="text/plain">
  <e:case>
    <e:expected> { "GET" : "/mirror/request" } </e:expected>
  </e:case>
</e:get>
will be rendered as:
GET mirror/request
Content-Type text/plain
Use cases:
2)
GET mirror/request HTTP/1.1
20019ms