Sindre Sorhus
578f38d527
Set `url` and `requestUrl` directly on the response ( #300 )
Party reverts: 382a0cfdd3
8 years ago
Vsevolod Strukchinsky
14d0859261
reduce retries number and make delays shorter ( #299 )
Closes #222
8 years ago
Alexander Tesfamichael
51a3eafbdf
Change stringifying options behavior ( #297 )
8 years ago
Philippe Masset
5476917722
Check protocol before sending request ( #295 )
8 years ago
Luke Childs
7b12b7582d
Don't throw HTTPError on 304 responses ( #252 )
8 years ago
Alexander Tesfamichael
a287f8ec8a
Add url to errors ( #286 )
8 years ago
Sindre Sorhus
1f1b6ffb6d
Bump dependencies and fix lint issues
8 years ago
Alexander Tesfamichael
919703cd8e
Add protocol to stdError ( #277 )
* Add protocol property to error properties test
* Add protocol to stdError object
Adds the protocol to the stdError object got uses for all its errors.
Closes #249 .
8 years ago
Vsevolod Strukchinsky
52ddf95efc
rename timeout option before passign to http.request
8 years ago
Dmitry Tsvettsikh
53b11e3539
use `safe-buffer` ( #253 )
8 years ago
Sindre Sorhus
98aa20682d
drop the `node-status-code` dependency
It was useful pre-v4, but now we're up to date.
8 years ago
Sindre Sorhus
e1ca864d9e
minor cleanup
8 years ago
Tommy Troy Lin
3b8665cec9
fix TypeError: binary is not a function ( #243 )
8 years ago
Vsevolod Strukchinsky
984cd7943c
fix url and responseUrl properties on gzip'ed response
Closes #240
8 years ago
Kevin Mårtensson
7e8af3362b
Add `url` to response ( #236 )
* Add `url` to response
Fixes #235 .
8 years ago
Kevin Martensson
5888ca7aa1
`new Buffer()` => `Buffer.from()`
8 years ago
Kevin Mårtensson
205e224bcd
Add `requestUrl` to response in streaming mode ( #230 )
* Add `requestUrl` to response in streaming mode (Fixes #229 ).
* Set `requestUrl` inside `requestAsEventEmitter()`
8 years ago
Sindre Sorhus
f616a0fced
make XO happy
8 years ago
bisubus
21b8b4a5bf
allow non-plain object as request body ( #217 )
* allow non-plain object as request body
* add tests for object request body
* fix test for non-plain object request body
* fix tests to pass linter
8 years ago
Dylan Piercey
57f13d9af2
Detect formdata body and set content-type header ( #220 )
8 years ago
Luan Muniz
9185b5beb0
Fix location encoding ( #214 )
* See nodejs/node#7928
8 years ago
Luan Muniz
1409f828fe
Add a `requestUrl` property to the response object ( #205 )
* Add requestUrl to response, update documentation and tests
* Add test when redirect
* Fix return description
* Add tests with params and fix test
* Add linebreak
8 years ago
Roland Warmerdam
52a67e60a1
Add redirect url to response object ( #191 )
8 years ago
Sindre Sorhus
9bb4696c16
fix lint issues with latest XO
8 years ago
Sindre Sorhus
7ad5e0efc2
fix failing test caused by changes in `prepend-http` module
d225dcbbbb
9 years ago
Sindre Sorhus
f33514146c
minor tweaks
9 years ago
Ruy Adorno
b3cd961254
Added option to toggle automatic following redirects
9 years ago
Sindre Sorhus
814bcacd14
remove moot regex escape
9 years ago
Sindre Sorhus
0664b9802f
code style - import order
9 years ago
André Cruz
26a499c033
Add statusCode to ParseError, closes #182 .
9 years ago
Luigi Pinca
45a636c6c2
parse the response body only if it is not empty
Fixes #170
9 years ago
birhoff
f9078b6440
Close #171 PR: Fix user-agent string RFC 2616 Section 14.43. Fixes #169
9 years ago
Vsevolod Strukchinsky
f9ef29a3fc
convert method to uppercase in options
Closes #164
9 years ago
Vsevolod Strukchinsky
01d54e8e49
filter some nasty errors
Related to #119 and #156
9 years ago
Vsevolod Strukchinsky
4bfedec3f1
check for pipe method only (part 2)
Don't know why I didn't replace all calls to isStream. This fix
error on passing Stream from multiparty.
Related 5205e7260f
9 years ago
Vsevolod Strukchinsky
8d37ed0b55
fix broken require
9 years ago
Vsevolod Strukchinsky
f0c43efe34
fix rebase typo
9 years ago
Vsevolod Strukchinsky
112d70d3f7
replace git url with `@floatdrop/duplexer2`
9 years ago
Vsevolod Strukchinsky
fa5a296129
remove object-assign
Cudos to @f0rmat1k
9 years ago
Vsevolod Strukchinsky
2989756030
simplify asPromise code
9 years ago
Vsevolod Strukchinsky
0e3954b055
merge asCallback with asPromise
9 years ago
Vsevolod Strukchinsky
20b7e845a6
remove callback interface
Closes #133
9 years ago
Vsevolod Strukchinsky
8af13eee18
fix failed rebase conflict
9 years ago
Vsevolod Strukchinsky
6fa957b53c
replace duplexify with patched duplexer2
Closes #135
9 years ago
Vsevolod Strukchinsky
cc36bb214a
remove parse-json
Closes #134
9 years ago
Vsevolod Strukchinsky
df6526461b
var → const & let
9 years ago
Vsevolod Strukchinsky
9378d92120
replace read-all-stream with get-stream
Closes #132
9 years ago
Vsevolod Strukchinsky
3c66bd74c7
use string templates where appropriate
9 years ago
Vsevolod Strukchinsky
5f76fa016f
basic consts and function arrow replacement
9 years ago
Vsevolod Strukchinsky
870cd03c99
remove pinkie-promise
9 years ago