Update data
PUT requests
To update an item via the API endpoint:
1Future<void> updateTodo() async {2 try {3 final options = RestOptions(4 path: '/todo/1',5 body: Uint8List.fromList('{\'name\':\'Mow the lawn\'}'.codeUnits),6 );7 final restOperation = Amplify.API.put(restOptions: options);8 final response = await restOperation.response;9 print('PUT call succeeded');10 print(response.body);11 } on ApiException catch (e) {12 print('PUT call failed: $e');13 }14}