Skip to content

Commit

Permalink
3.2.1: Improve handling of buffers (Resolves #30)
Browse files Browse the repository at this point in the history
- Resolved issue by updating centra library.
- Added relevant test.
  • Loading branch information
ethan7g committed Jan 1, 2019
1 parent de6dff7 commit 18dc597
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "phin",
"version": "3.2.0",
"version": "3.2.1",
"description": "Ultra-simple, lightweight, dependency-free Node.JS HTTP request client",
"main": "lib/phin.min.js",
"scripts": {
Expand Down Expand Up @@ -38,6 +38,6 @@
"node": ">= 8"
},
"dependencies": {
"centra": "^2.1.0"
"centra": "^2.2.1"
}
}
10 changes: 10 additions & 0 deletions tests/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,4 +387,14 @@ w.add('Defaults with object options', async (result) => {
result(res.statusCode === 200 && res.body.toString() === 'Got your POST.', res.statusCode)
})

w.add('Buffer body', async (result) => {
const res = await pp({
'method': 'POST',
'url': 'http://localhost:5136/testpost',
'data': Buffer.from('Hey there!')
})

result(res.statusCode === 200, res.body.toString())
})

var httpServer = http.createServer(httpHandler).listen(5136, w.test)

0 comments on commit 18dc597

Please sign in to comment.