resolveBodySync static method
Resolves a payload
to an HTTP body (Does NOT accept payload
as a Future).
See resolveBody.
Implementation
static Object? resolveBodySync(dynamic payload, APIResponse apiResponse) {
if (payload == null) return null;
if (payload is Future) {
throw ArgumentError(
"`payload` can't be a `Future`. Use `resolveBody` for asynchronous call.");
}
return _resolveBodyImpl(payload, apiResponse);
}