Skip to content

Commit

Permalink
add content lenght to body
Browse files Browse the repository at this point in the history
  • Loading branch information
Gary Xue authored and Gary Xue committed Nov 7, 2019
1 parent bc49b2c commit bece423
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postmate",
"version": "1.1.1",
"version": "1.1.2",
"private": true,
"main": "public/electron.js",
"homepage": "./",
Expand Down
5 changes: 4 additions & 1 deletion src/request-sender/request-sender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ export default async function send(
console.info(`Sending request to ${request.url}`);
const option: { [index: string]: any } = {
method: request.method,
headers: request.headers,
headers: {
...request.headers,
'content-length': request.body.length //TODO deal with unicode
},
...certOption
};
const newRequest = (request.isHttps ? https : http).request(
Expand Down

0 comments on commit bece423

Please sign in to comment.