Skip to content

Commit

Permalink
Delete content-length header so it is recalculated for request. probo…
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomáš Hruška authored Feb 25, 2021
1 parent 2c34dab commit a990fab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ class Client {
const req = superagent.post(url.format(target)).send(data.body)

delete data.body

delete data['content-length']

Object.keys(data).forEach(key => {
req.set(key, data[key])
})
Expand Down

0 comments on commit a990fab

Please sign in to comment.