put method

Future<Response> put(
  1. dynamic url, {
  2. Map<String, String>? headers,
  3. Map<String, dynamic>? params,
  4. Object? body,
  5. Encoding? encoding,
})

Performs a PUT request with a new Client instance and closes it after it has been used.

Implementation

Future<Response> put(
  url, {
  Map<String, String>? headers,
  Map<String, dynamic>? params,
  Object? body,
  Encoding? encoding,
}) async {
  return _withClient((client) => client.put(
        url,
        headers: headers,
        params: params,
        body: body,
        encoding: encoding,
      ));
}