Skip to content

Commit

Permalink
fix(request): bind req.body assignments;
Browse files Browse the repository at this point in the history
- Closes #9
  • Loading branch information
lukeed committed Mar 22, 2021
1 parent 4e0a0b2 commit 693c15a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ export function ServerRequest(this: SR, event: FetchEvent): SR {

// @ts-ignore - expects all properties upfront
$.body = body.bind(0, request, $.headers.get('content-type'));
$.body.blob=request.blob; $.body.text=request.text;
$.body.arrayBuffer = request.arrayBuffer;
$.body.formData = request.formData;
$.body.json = request.json;
$.body.blob=request.blob.bind(request); $.body.text=request.text.bind(request);
$.body.arrayBuffer = request.arrayBuffer.bind(request);
$.body.formData = request.formData.bind(request);
$.body.json = request.json.bind(request);

return $;
}

0 comments on commit 693c15a

Please sign in to comment.