put method
PUT Request
Implementation
Future<dynamic> put(String model, String body,
{String? field,
String? value,
Map<String, String>? customHeaders,
String pageId = "1",
String pageSize = "0",
String contentType = "application/json"}) async {
http.Response response;
try {
response = await client.put(
generateEndpointUrl(model, field: field, value: value),
headers: generateHeader(
customHeaders: customHeaders,
pageId: pageId,
pageSize: pageSize,
contentType: contentType),
body: body,
);
} catch (e) {
throw Exception("Unable to make PUT request. ${e.toString()}");
}
return response;
}