Skip to content

Commit

Permalink
fix: fix issue where body wasn't sent at all
Browse files Browse the repository at this point in the history
  • Loading branch information
junlarsen committed Dec 4, 2020
1 parent dbbc598 commit 65d7fc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export async function request<T = any, R = any>(

const response = await fetch(url, {
method: options.method,
body: hasBody ? undefined : JSON.stringify(options.body),
body: hasBody ? JSON.stringify(options.body) : undefined,
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
Expand Down

0 comments on commit 65d7fc9

Please sign in to comment.