headers method
Set multiple HTTP headers at once.
Example:
testApp.get('/api/data')
.headers({
'Accept': 'application/json',
'X-API-Version': '2.0',
'User-Agent': 'TestClient/1.0',
});
headers Map of header names to values.
Returns this request builder for method chaining.
Implementation
TestRequest headers(Map<String, String> headers) {
_headers.addAll(headers);
return this;
}