buildRequestBody method
HttpRequestBody
buildRequestBody(
- HttpClient client,
- HttpRequestBody httpBody,
- Authorization? authorization
Helper to build the request body.
Implementation
HttpRequestBody buildRequestBody(
HttpClient client,
HttpRequestBody httpBody,
Authorization? authorization,
) {
if (authorization != null && authorization.isCredentialResolved) {
var jsonBody = authorization.resolvedCredential!.buildBody(httpBody);
if (jsonBody != null) return jsonBody;
}
return httpBody;
}