UNPKG

20.6 kBMarkdownView Raw
1# 3.4.1 (2017-01-29)
2
3 * Allow `retry()` and `retry(0)` (Alexander Pope)
4 * Allow optional body/data in DELETE requests (Alpha Shuro)
5 * Fixed query string on retried requests (Kornel Lesiński)
6
7# 3.4.0 (2017-01-25)
8
9 * New `.retry(n)` method and `err.retries` (Alexander Pope)
10 * Docs for HTTPS request (Jun Wan Goh)
11
12# 3.3.1 (2016-12-17)
13
14 * Fixed "double callback bug" warning on timeouts of gzipped responses
15
16# 3.3.0 (2016-12-14)
17
18 * Added `.ok(callback)` that allows customizing which responses are errors (Kornel Lesiński)
19 * Added `.responseType()` to Node version (Kornel Lesiński)
20 * Added `.parse()` to browser version (jakepearson)
21 * Fixed parse error when using `responseType('blob')` (Kornel Lesiński)
22
23# 3.2.0 (2016-12-11)
24
25 * Added `.timeout({response:ms})`, which allows limiting maximum response time independently from total download time (Kornel Lesiński)
26 * Added warnings when `.end()` is called more than once (Kornel Lesiński)
27 * Added `response.links` to browser version (Lukas Eipert)
28 * `btoa` is no longer required in IE9 (Kornel Lesiński)
29 * Fixed `.sortQuery()` on URLs without query strings (Kornel Lesiński)
30 * Refactored common response code into `ResponseBase` (Lukas Eipert)
31
32# 3.1.0 (2016-11-28)
33
34 * Added `.sortQuery()` (vicanso)
35 * Added support for arrays and bools in `.field()` (Kornel Lesiński)
36 * Made `superagent.Request` subclassable without need to patch all static methods (Kornel Lesiński)
37
38# 3.0.0 (2016-11-19)
39
40 * Dropped support for Node 0.x. Please upgrade to at least Node 4.
41 * Dropped support for componentjs (Damien Caselli)
42 * Removed deprecated `.part()`/`superagent.Part` APIs.
43 * Removed unreliable `.body` property on internal response object used by unbuffered parsers.
44 Note: the normal `response.body` is unaffected.
45 * Multiple `.send()` calls mixing `Buffer`/`Blob` and JSON data are not possible and will now throw instead of messing up the data.
46 * Improved `.send()` data object type check (Fernando Mendes)
47 * Added common prototype for Node and browser versions (Andreas Helmberger)
48 * Added `http+unix:` schema to support Unix sockets (Yuki KAN)
49 * Added full `attach` options parameter in the Node version (Lapo Luchini)
50 * Added `pfx` TLS option with new `pfx()` method. (Reid Burke)
51 * Internally changed `.on` to `.once` to prevent possible memory leaks (Matt Blair)
52 * Made all errors reported as an event (Kornel Lesiński)
53
54# 2.3.0 (2016-09-20)
55
56 * Enabled `.field()` to handle objects (Affan Shahid)
57 * Added authentication with client certificates (terusus)
58 * Added `.catch()` for more Promise-like interface (Maxim Samoilov, Kornel Lesiński)
59 * Silenced errors from incomplete gzip streams for compatibility with web browsers (Kornel Lesiński)
60 * Fixed `event.direction` in uploads (Kornel Lesiński)
61 * Fixed returned value of overwritten response object's `on()` method (Juan Dopazo)
62
63# 2.2.0 (2016-08-13)
64
65 * Added `timedout` property to node Request instance (Alexander Pope)
66 * Unified `null` querystring values in node and browser environments. (George Chung)
67
68# 2.1.0 (2016-06-14)
69
70 * Refactored async parsers. Now the `end` callback waits for async parsers to finish (Kornel Lesiński)
71 * Errors thrown in `.end()` callback don't cause the callback to be called twice (Kornel Lesiński)
72 * Added `headers` to `toJSON()` (Tao)
73
74# 2.0.0 (2016-05-29)
75
76## Breaking changes
77
78Breaking changes are in rarely used functionality, so we hope upgrade will be smooth for most users.
79
80 * Browser: The `.parse()` method has been renamed to `.serialize()` for consistency with NodeJS version.
81 * Browser: Query string keys without a value used to be parsed as `'undefined'`, now their value is `''` (empty string) (shura, Kornel Lesiński).
82 * NodeJS: The `redirect` event is called after new query string and headers have been set and is allowed to override the request URL (Kornel Lesiński)
83 * `.then()` returns a real `Promise`. Note that use of superagent with promises now requires a global `Promise` object.
84 If you target Internet Explorer or Node 0.10, you'll need `require('es6-promise').polyfill()` or similar.
85 * Upgraded all dependencies (Peter Lyons)
86 * Renamed properties documented as `@api private` to have `_prefixed` names (Kornel Lesiński)
87
88## Probably not breaking changes:
89
90 * Extracted common functions to request-base (Peter Lyons)
91 * Fixed race condition in pipe tests (Peter Lyons)
92 * Handle `FormData` error events (scriptype)
93 * Fixed wrong jsdoc of Request#attach (George Chung)
94 * Updated and improved tests (Peter Lyons)
95 * `request.head()` supports `.redirects(5)` call (Kornel Lesiński)
96 * `response` event is also emitted when using `.pipe()`
97
98# 1.8.2 (2016-03-20)
99
100 * Fixed handling of HTTP status 204 with content-encoding: gzip (Andrew Shelton)
101 * Handling of FormData error events (scriptype)
102 * Fixed parsing of `vnd+json` MIME types (Kornel Lesiński)
103 * Aliased browser implementation of `.parse()` as `.serialize()` for forward compatibility
104
105# 1.8.1 (2016-03-14)
106
107 * Fixed form-data incompatibility with IE9
108
109# 1.8.0 (2016-03-09)
110
111 * Extracted common code into request-base class (Peter Lyons)
112 * It does not affect the public API, but please let us know if you notice any plugins/subclasses breaking!
113 * Added option `{type:'auto'}` to `auth` method, which enables browser-native auth types (Jungle, Askar Yusupov)
114 * Added `responseType()` to set XHR `responseType` (chris)
115 * Switched to form-data for browserify-compatible `FormData` (Peter Lyons)
116 * Added `statusCode` to error response when JSON response is malformed (mattdell)
117 * Prevented TCP port conflicts in all tests (Peter Lyons)
118 * Updated form-data dependency
119
120# 1.7.2 (2016-01-26)
121
122 * Fix case-sensitivity of header fields introduced by a4ddd6a. (Edward J. Jinotti)
123 * bump extend dependency, as former version did not contain any license information (Lukas Eipert)
124
125# 1.7.1 (2016-01-21)
126
127 * Fixed a conflict with express when using npm 3.x (Glenn)
128 * Fixed redirects after a multipart/form-data POST request (cyclist2)
129
130# 1.7.0 (2016-01-18)
131
132 * When attaching files, read default filename from the `File` object (JD Isaacks)
133 * Add `direction` property to `progress` events (Joseph Dykstra)
134 * Update component-emitter & formidable (Kornel Lesiński)
135 * Don't re-encode query string needlessly (Ruben Verborgh)
136 * ensure querystring is appended when doing `stream.pipe(request)` (Keith Grennan)
137 * change set header function, not call `this.request()` until call `this.end()` (vicanso)
138 * Add no-op `withCredentials` to Node API (markdalgleish)
139 * fix `delete` breaking on ie8 (kenjiokabe)
140 * Don't let request error override responses (Clay Reimann)
141 * Increased number of tests shared between node and client (Kornel Lesiński)
142
143# 1.6.0/1.6.1 (2015-12-09)
144
145 * avoid misleading CORS error message
146 * added 'progress' event on file/form upload in Node (Olivier Lalonde)
147 * return raw response if the response parsing fails (Rei Colina)
148 * parse content-types ending with `+json` as JSON (Eiryyy)
149 * fix to avoid throwing errors on aborted requests (gjurgens)
150 * retain cookies on redirect when hosts match (Tom Conroy)
151 * added Bower manifest (Johnny Freeman)
152 * upgrade to latest cookiejar (Andy Burke)
153
154# 1.5.0 (2015-11-30)
155
156 * encode array values as `key=1&key=2&key=3` etc... (aalpern, Davis Kim)
157 * avoid the error which is omitted from 'socket hang up'
158 * faster JSON parsing, handling of zlib errors (jbellenger)
159 * fix IE11 sends 'undefined' string if data was undefined (Vadim Goncharov)
160 * alias `del()` method as `delete()` (Aaron Krause)
161 * revert Request#parse since it was actually Response#parse
162
163# 1.4.0 (2015-09-14)
164
165 * add Request#parse method to client library
166 * add missing statusCode in client response
167 * don't apply JSON heuristics if a valid parser is found
168 * fix detection of root object for webworkers
169
170# 1.3.0 (2015-08-05)
171
172 * fix incorrect content-length of data set to buffer
173 * serialize request data takes into account charsets
174 * add basic promise support via a `then` function
175
176# 1.2.0 (2015-04-13)
177
178 * add progress events to downlodas
179 * make usable in webworkers
180 * add support for 308 redirects
181 * update node-form-data dependency
182 * update to work in react native
183 * update node-mime dependency
184
185# 1.1.0 (2015-03-13)
186
187 * Fix responseType checks without xhr2 and ie9 tests (rase-)
188 * errors have .status and .response fields if applicable (defunctzombie)
189 * fix end callback called before saving cookies (rase-)
190
1911.0.0 / 2015-03-08
192==================
193
194 * All non-200 responses are treated as errors now. (The callback is called with an error when the response has a status < 200 or >= 300 now. In previous versions this would not have raised an error and the client would have to check the `res` object. See [#283](https://github.com/visionmedia/superagent/issues/283).
195 * keep timeouts intact across redirects (hopkinsth)
196 * handle falsy json values (themaarten)
197 * fire response events in browser version (Schoonology)
198 * getXHR exported in client version (KidsKilla)
199 * remove arity check on `.end()` callbacks (defunctzombie)
200 * avoid setting content-type for host objects (rexxars)
201 * don't index array strings in querystring (travisjeffery)
202 * fix pipe() with redirects (cyrilis)
203 * add xhr2 file download (vstirbu)
204 * set default response type to text/plain if not specified (warrenseine)
205
2060.21.0 / 2014-11-11
207==================
208
209 * Trim text before parsing json (gjohnson)
210 * Update tests to express 4 (gaastonsr)
211 * Prevent double callback when error is thrown (pgn-vole)
212 * Fix missing clearTimeout (nickdima)
213 * Update debug (TooTallNate)
214
2150.20.0 / 2014-10-02
216==================
217
218 * Add toJSON() to request and response instances. (yields)
219 * Prevent HEAD requests from getting parsed. (gjohnson)
220 * Update debug. (TooTallNate)
221
2220.19.1 / 2014-09-24
223==================
224
225 * Fix basic auth issue when password is falsey value. (gjohnson)
226
2270.19.0 / 2014-09-24
228==================
229
230 * Add unset() to browser. (shesek)
231 * Prefer XHR over ActiveX. (omeid)
232 * Catch parse errors. (jacwright)
233 * Update qs dependency. (wercker)
234 * Add use() to node. (Financial-Times)
235 * Add response text to errors. (yields)
236 * Don't send empty cookie headers. (undoZen)
237 * Don't parse empty response bodies. (DveMac)
238 * Use hostname when setting cookie host. (prasunsultania)
239
2400.18.2 / 2014-07-12
241==================
242
243 * Handle parser errors. (kof)
244 * Ensure not to use default parsers when there is a user defined one. (kof)
245
2460.18.1 / 2014-07-05
247==================
248
249 * Upgrade cookiejar dependency (juanpin)
250 * Support image mime types (nebulade)
251 * Make .agent chainable (kof)
252 * Upgrade debug (TooTallNate)
253 * Fix docs (aheckmann)
254
2550.18.0 / 2014-04-29
256===================
257
258* Use "form-data" module for the multipart/form-data implementation. (TooTallNate)
259* Add basic `field()` and `attach()` functions for HTML5 FormData. (TooTallNate)
260* Deprecate `part()`. (TooTallNate)
261* Set default user-agent header. (bevacqua)
262* Add `unset()` method for removing headers. (bevacqua)
263* Update cookiejar. (missinglink)
264* Fix response error formatting. (shesek)
265
2660.17.0 / 2014-03-06
267===================
268
269 * supply uri malformed error to the callback (yields)
270 * add request event (yields)
271 * allow simple auth (yields)
272 * add request event (yields)
273 * switch to component/reduce (visionmedia)
274 * fix part content-disposition (mscdex)
275 * add browser testing via zuul (defunctzombie)
276 * adds request.use() (johntron)
277
2780.16.0 / 2014-01-07
279==================
280
281 * remove support for 0.6 (superjoe30)
282 * fix CORS withCredentials (wejendorp)
283 * add "test" script (superjoe30)
284 * add request .accept() method (nickl-)
285 * add xml to mime types mappings (nickl-)
286 * fix parse body error on HEAD requests (gjohnson)
287 * fix documentation typos (matteofigus)
288 * fix content-type + charset (bengourley)
289 * fix null values on query parameters (cristiandouce)
290
2910.15.7 / 2013-10-19
292==================
293
294 * pin should.js to 1.3.0 due to breaking change in 2.0.x
295 * fix browserify regression
296
2970.15.5 / 2013-10-09
298==================
299
300 * add browser field to support browserify
301 * fix .field() value number support
302
3030.15.4 / 2013-07-09
304==================
305
306 * node: add a Request#agent() function to set the http Agent to use
307
3080.15.3 / 2013-07-05
309==================
310
311 * fix .pipe() unzipping on more recent nodes. Closes #240
312 * fix passing an empty object to .query() no longer appends "?"
313 * fix formidable error handling
314 * update formidable
315
3160.15.2 / 2013-07-02
317==================
318
319 * fix: emit 'end' when piping.
320
3210.15.1 / 2013-06-26
322==================
323
324 * add try/catch around parseLinks
325
3260.15.0 / 2013-06-25
327==================
328
329 * make `Response#toError()` have a more meaningful `message`
330
3310.14.9 / 2013-06-15
332==================
333
334 * add debug()s to the node client
335 * add .abort() method to node client
336
3370.14.8 / 2013-06-13
338==================
339
340 * set .agent = false always
341 * remove X-Requested-With. Closes #189
342
3430.14.7 / 2013-06-06
344==================
345
346 * fix unzip error handling
347
3480.14.6 / 2013-05-23
349==================
350
351 * fix HEAD unzip bug
352
3530.14.5 / 2013-05-23
354==================
355
356 * add flag to ensure the callback is __never__ invoked twice
357
3580.14.4 / 2013-05-22
359==================
360
361 * add superagent.js build output
362 * update qs
363 * update emitter-component
364 * revert "add browser field to support browserify" see GH-221
365
3660.14.3 / 2013-05-18
367==================
368
369 * add browser field to support browserify
370
3710.14.2/ 2013-05-07
372==================
373
374 * add host object check to fix serialization of File/Blobs etc as json
375
3760.14.1 / 2013-04-09
377==================
378
379 * update qs
380
3810.14.0 / 2013-04-02
382==================
383
384 * add client-side basic auth
385 * fix retaining of .set() header field case
386
3870.13.0 / 2013-03-13
388==================
389
390 * add progress events to client
391 * add simple example
392 * add res.headers as alias of res.header for browser client
393 * add res.get(field) to node/client
394
3950.12.4 / 2013-02-11
396==================
397
398 * fix get content-type even if can't get other headers in firefox. fixes #181
399
4000.12.3 / 2013-02-11
401==================
402
403 * add quick "progress" event support
404
4050.12.2 / 2013-02-04
406==================
407
408 * add test to check if response acts as a readable stream
409 * add ReadableStream in the Response prototype.
410 * add test to assert correct redirection when the host changes in the location header.
411 * add default Accept-Encoding. Closes #155
412 * fix req.pipe() return value of original stream for node parity. Closes #171
413 * remove the host header when cleaning headers to properly follow the redirection.
414
4150.12.1 / 2013-01-10
416==================
417
418 * add x-domain error handling
419
4200.12.0 / 2013-01-04
421==================
422
423 * add header persistence on redirects
424
4250.11.0 / 2013-01-02
426==================
427
428 * add .error Error object. Closes #156
429 * add forcing of res.text removal for FF HEAD responses. Closes #162
430 * add reduce component usage. Closes #90
431 * move better-assert dep to development deps
432
4330.10.0 / 2012-11-14
434==================
435
436 * add req.timeout(ms) support for the client
437
4380.9.10 / 2012-11-14
439==================
440
441 * fix client-side .query(str) support
442
4430.9.9 / 2012-11-14
444==================
445
446 * add .parse(fn) support
447 * fix socket hangup with dates in querystring. Closes #146
448 * fix socket hangup "error" event when a callback of arity 2 is provided
449
4500.9.8 / 2012-11-03
451==================
452
453 * add emission of error from `Request#callback()`
454 * add a better fix for nodes weird socket hang up error
455 * add PUT/POST/PATCH data support to client short-hand functions
456 * add .license property to component.json
457 * change client portion to build using component(1)
458 * fix GET body support [guille]
459
4600.9.7 / 2012-10-19
461==================
462
463 * fix `.buffer()` `res.text` when no parser matches
464
4650.9.6 / 2012-10-17
466==================
467
468 * change: use `this` when `window` is undefined
469 * update to new component spec [juliangruber]
470 * fix emission of "data" events for compressed responses without encoding. Closes #125
471
4720.9.5 / 2012-10-01
473==================
474
475 * add field name to .attach()
476 * add text "parser"
477 * refactor isObject()
478 * remove wtf isFunction() helper
479
4800.9.4 / 2012-09-20
481==================
482
483 * fix `Buffer` responses [TooTallNate]
484 * fix `res.type` when a "type" param is present [TooTallNate]
485
4860.9.3 / 2012-09-18
487==================
488
489 * remove __GET__ `.send()` == `.query()` special-case (__API__ change !!!)
490
4910.9.2 / 2012-09-17
492==================
493
494 * add `.aborted` prop
495 * add `.abort()`. Closes #115
496
4970.9.1 / 2012-09-07
498==================
499
500 * add `.forbidden` response property
501 * add component.json
502 * change emitter-component to 0.0.5
503 * fix client-side tests
504
5050.9.0 / 2012-08-28
506==================
507
508 * add `.timeout(ms)`. Closes #17
509
5100.8.2 / 2012-08-28
511==================
512
513 * fix pathname relative redirects. Closes #112
514
5150.8.1 / 2012-08-21
516==================
517
518 * fix redirects when schema is specified
519
5200.8.0 / 2012-08-19
521==================
522
523 * add `res.buffered` flag
524 * add buffering of text/*, json and forms only by default. Closes #61
525 * add `.buffer(false)` cancellation
526 * add cookie jar support [hunterloftis]
527 * add agent functionality [hunterloftis]
528
5290.7.0 / 2012-08-03
530==================
531
532 * allow `query()` to be called after the internal `req` has been created [tootallnate]
533
5340.6.0 / 2012-07-17
535==================
536
537 * add `res.send('foo=bar')` default of "application/x-www-form-urlencoded"
538
5390.5.1 / 2012-07-16
540==================
541
542 * add "methods" dep
543 * add `.end()` arity check to node callbacks
544 * fix unzip support due to weird node internals
545
5460.5.0 / 2012-06-16
547==================
548
549 * Added "Link" response header field parsing, exposing `res.links`
550
5510.4.3 / 2012-06-15
552==================
553
554 * Added 303, 305 and 307 as redirect status codes [slaskis]
555 * Fixed passing an object as the url
556
5570.4.2 / 2012-06-02
558==================
559
560 * Added component support
561 * Fixed redirect data
562
5630.4.1 / 2012-04-13
564==================
565
566 * Added HTTP PATCH support
567 * Fixed: GET / HEAD when following redirects. Closes #86
568 * Fixed Content-Length detection for multibyte chars
569
5700.4.0 / 2012-03-04
571==================
572
573 * Added `.head()` method [browser]. Closes #78
574 * Added `make test-cov` support
575 * Added multipart request support. Closes #11
576 * Added all methods that node supports. Closes #71
577 * Added "response" event providing a Response object. Closes #28
578 * Added `.query(obj)`. Closes #59
579 * Added `res.type` (browser). Closes #54
580 * Changed: default `res.body` and `res.files` to {}
581 * Fixed: port existing query-string fix (browser). Closes #57
582
5830.3.0 / 2012-01-24
584==================
585
586 * Added deflate/gzip support [guillermo]
587 * Added `res.type` (Content-Type void of params)
588 * Added `res.statusCode` to mirror node
589 * Added `res.headers` to mirror node
590 * Changed: parsers take callbacks
591 * Fixed optional schema support. Closes #49
592
5930.2.0 / 2012-01-05
594==================
595
596 * Added url auth support
597 * Added `.auth(username, password)`
598 * Added basic auth support [node]. Closes #41
599 * Added `make test-docs`
600 * Added guillermo's EventEmitter. Closes #16
601 * Removed `Request#data()` for SS, renamed to `send()`
602 * Removed `Request#data()` from client, renamed to `send()`
603 * Fixed array support. [browser]
604 * Fixed array support. Closes #35 [node]
605 * Fixed `EventEmitter#emit()`
606
6070.1.3 / 2011-10-25
608==================
609
610 * Added error to callback
611 * Bumped node dep for 0.5.x
612
6130.1.2 / 2011-09-24
614==================
615
616 * Added markdown documentation
617 * Added `request(url[, fn])` support to the client
618 * Added `qs` dependency to package.json
619 * Added options for `Request#pipe()`
620 * Added support for `request(url, callback)`
621 * Added `request(url)` as shortcut for `request.get(url)`
622 * Added `Request#pipe(stream)`
623 * Added inherit from `Stream`
624 * Added multipart support
625 * Added ssl support (node)
626 * Removed Content-Length field from client
627 * Fixed buffering, `setEncoding()` to utf8 [reported by stagas]
628 * Fixed "end" event when piping
629
6300.1.1 / 2011-08-20
631==================
632
633 * Added `res.redirect` flag (node)
634 * Added redirect support (node)
635 * Added `Request#redirects(n)` (node)
636 * Added `.set(object)` header field support
637 * Fixed `Content-Length` support
638
6390.1.0 / 2011-08-09
640==================
641
642 * Added support for multiple calls to `.data()`
643 * Added support for `.get(uri, obj)`
644 * Added GET `.data()` querystring support
645 * Added IE{6,7,8} support [alexyoung]
646
6470.0.1 / 2011-08-05
648==================
649
650 * Initial commit
651