Skip to content

Commit

Permalink
fix: The body of a request is being parsed from the whole request opt…
Browse files Browse the repository at this point in the history
…ions object instead of just the body field.
  • Loading branch information
adam-coster committed Jun 28, 2021
1 parent 4ebf40a commit 7931b1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/clientLib/FavroClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export class FavroClient {
throwIfBodyAndMethodIncompatible(method, options?.body);
// Ensure initial slash
url = createFavroApiUrl(url, options?.query);
const { contentType, body } = computeBodyProps(options);
const { contentType, body } = computeBodyProps(options?.body);
const headers = cleanHeaders({
Host: 'favro.com', // Required by API (otherwise fails without explanation)
'Content-Type': contentType!,
Expand Down

0 comments on commit 7931b1f

Please sign in to comment.