contentType method
Set the Content-Type header for the request.
Example:
testApp.post('/api/data')
.contentType('application/xml')
.body(xmlData);
type MIME type for the content (e.g., 'application/json').
Returns this request builder for method chaining.
Implementation
TestRequest contentType(String type) {
_contentType = type;
return this;
}