send<ResponseType> method
Future<ResponseType>
send<
ResponseType>( - BaseRequest request, {
- JsonDeserializer<ResponseType>? responseDeserializer,
})
Implementation
@protected
Future<ResponseType> send<ResponseType>(
http.BaseRequest request, {
Map<String, String>? headers,
JsonDeserializer<ResponseType>? responseDeserializer,
}) async {
if (headers != null) {
request.headers.addAll(headers);
}
log.finest(() =>
'Sending a ${request.method.toUpperCase()} request to ${request.url}');
return _handleResponse<ResponseType>(
request,
await http.Response.fromStream(await _httpClient.send(request)),
responseDeserializer: responseDeserializer,
);
}