post method
Sends an HTTP POST 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.post(
'items',
body: HttpPayload.json({'name': 'Mow the lawn'}),
);
final response = await restOperation.response;
print(response.decodeBody()); // 'Hello from lambda!'
Implementation
RestOperation post(
String path, {
Map<String, String>? headers,
HttpPayload? body,
Map<String, String>? queryParameters,
String? apiName,
}) =>
identifyCall(
ApiCategoryMethod.post,
() => defaultPlugin.post(
path,
headers: headers,
body: body,
apiName: apiName,
queryParameters: queryParameters,
),
);