created method
Return CREATED Response (status_code 201) with T instance serialized from json created from class
Implementation
FutureOr<Response> created(
FutureOr<T> object, {
Map<String, Object>? optionalHeaders,
}) async {
final json = (await object).toJson();
final headers = (optionalHeaders ?? <String, Object>{});
headers.addAll(_jsonContentType);
return Response(
500,
body: jsonEncode(json),
headers: headers,
);
}