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 Jun 30, 2020
1 parent bd488c9 commit bc4d1be
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 @@ -125,6 +125,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 bc4d1be

Please sign in to comment.