create method
Implementation
Future<ITask> create(
ITask task,
) async {
final builder = RequestBuilder();
builder.body = task;
if (task == null) {
throw BadRequestException.singleField(
"task",
"Missing required request parameter",
keyword: "required",
);
}
// create path and map variables
// create path and map variables
builder.path = "/mverse/0.0.1/contact/task";
List<String> contentTypes = [];
String contentType =
contentTypes.isNotEmpty ? contentTypes[0] : "application/json";
builder.contentType = contentType;
builder.basePath = apiClient.basePaths["contact_v2"];
builder.method = HttpMethod.POST;
final response = await apiClient.invokeRequest(builder);
final value = json.decode(response.body);
return ITask.fromJson(value);
}