requestPUT method
Future<HttpResponse>
requestPUT(
- HttpClient client,
- String url, {
- Map<
String, String> ? headers, - Authorization? authorization,
- Map<
String, String?> ? queryParameters, - bool noQueryString = false,
- Object? body,
- String? contentType,
- String? accept,
- String? responseType,
- ProgressListener? progressListener,
Implementation
Future<HttpResponse> requestPUT(HttpClient client, String url,
{Map<String, String>? headers,
Authorization? authorization,
Map<String, String?>? queryParameters,
bool noQueryString = false,
Object? body,
String? contentType,
String? accept,
String? responseType,
ProgressListener? progressListener}) async {
var httpBody = HttpRequestBody(body, contentType, queryParameters);
var requestBody = buildRequestBody(client, httpBody, authorization);
var requestURL = buildRequestURL(client, url,
authorization: authorization,
queryParameters: queryParameters,
noQueryString: noQueryString);
var requestHeaders = buildRequestHeaders(client, HttpMethod.PUT, url,
headers: headers,
authorization: authorization,
contentType: requestBody.contentType,
accept: accept);
requestURL = await client._interceptRequest(
HttpMethod.PUT, requestURL, requestHeaders);
return submitHttpRequest(
client,
HttpRequest(
HttpMethod.PUT,
url,
requestURL,
authorization: authorization,
queryParameters: queryParameters,
withCredentials: _withCredentials(client, authorization),
requestHeaders: requestHeaders,
sendData: requestBody.contentAsSendData,
responseType: responseType,
),
progressListener,
client.logRequests);
}