patch method

RestOperation patch(
  1. String path, {
  2. Map<String, String>? headers,
  3. HttpPayload? body,
  4. Map<String, String>? queryParameters,
  5. String? apiName,
})

Sends an HTTP PATCH request to the REST API endpoint.

See https://docs.amplify.aws/lib/restapi/update/q/platform/flutter/ for more information.

Example:

final restOperation = Amplify.API.patch(
  'items',
  body: HttpPayload.json({'name': 'Mow the lawn'}),
);
final response = await restOperation.response;
print(response.decodeBody()); // 'Hello from lambda!'

Implementation

RestOperation patch(
  String path, {
  Map<String, String>? headers,
  HttpPayload? body,
  Map<String, String>? queryParameters,
  String? apiName,
}) =>
    identifyCall(
      ApiCategoryMethod.patch,
      () => defaultPlugin.patch(
        path,
        headers: headers,
        body: body,
        apiName: apiName,
        queryParameters: queryParameters,
      ),
    );