updateRecipe method

Future<DynamiteResponse<int, void>> updateRecipe({
  1. required String id,
  2. required Recipe $body,
})

Update a recipe.

Returns a Future containing a DynamiteResponse with the status code, deserialized body and headers. Throws a DynamiteApiException if the API call does not return an expected status code.

Status codes:

  • 200: The recipe was sucessfully updated
  • 422: There was no name in the request given for the recipe. Cannot save the recipe.

See:

Implementation

Future<_i1.DynamiteResponse<int, void>> updateRecipe({
  required String id,
  required Recipe $body,
}) async {
  final _request = $updateRecipe_Request(
    id: id,
    $body: $body,
  );
  final _streamedResponse = await _rootClient.httpClient.send(_request);
  final _response = await _i3.Response.fromStream(_streamedResponse);

  final _serializer = $updateRecipe_Serializer();
  return _i1.ResponseConverter<int, void>(_serializer).convert(_response);
}