put method

Future<Response> put(
  1. String uri, {
  2. Map<String, String>? headers,
  3. Map<String, String>? queryParams,
  4. Object? body,
})

Performs a PUT request (not cached by default).

  • uri: The URI path to request (appended to baseUrl)
  • headers: Optional HTTP headers for the request
  • queryParams: Optional query parameters to add to the URL
  • body: The request body (will be JSON-encoded if it's a Map)

Returns a Future that completes with the Response.

Implementation

Future<http.Response> put(String uri,
    {Map<String, String>? headers,
    Map<String, String>? queryParams,
    Object? body}) {
  return _handleRequest(
    method: REQUEST_METHODS.PUT,
    uri: uri,
    headers: headers,
    queryParams: queryParams,
    body: body,
  );
}