Skip to content

Commit

Permalink
Merge pull request #536 from ThisIsMissEm/patch-1
Browse files Browse the repository at this point in the history
fix: correctly pass query args to GET endpoints
  • Loading branch information
simplyspoke authored Feb 21, 2021
2 parents 1142f4f + fb90207 commit 28c11bd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ export class RequestClient {
options.method = task.method;
options.uri = task.uri;

options.body = JSON.stringify(task.data);
if (task.method === 'GET') {
options.qs = task.data;
} else {
options.body = JSON.stringify(task.data);
}

this.request(options)
.then(({ headers, data }) => {
Expand Down

0 comments on commit 28c11bd

Please sign in to comment.