Skip to content

Commit

Permalink
fixup! feat(common): add URLSearchParams to request body
Browse files Browse the repository at this point in the history
  • Loading branch information
ajitsinghkaler committed May 7, 2021
1 parent 2df9e78 commit 9307516
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/common/http/test/request_spec.ts
Expand Up @@ -143,6 +143,10 @@ const TEST_STRING = `I'm a body!`;
const body = new ArrayBuffer(4);
expect(baseReq.clone({body}).serializeBody()).toBe(body);
});
it('passes URLSearchParams through', () => {
const body = new URLSearchParams("foo=1&bar=2");
expect(baseReq.clone({body}).serializeBody()).toBe(body);
});
it('passes strings through', () => {
const body = 'hello world';
expect(baseReq.clone({body}).serializeBody()).toBe(body);
Expand Down

0 comments on commit 9307516

Please sign in to comment.