Releases: cyclejs/http
Support progress events
Update superagent to v1.7.2
Update superagent from v1.4.0 to v1.7.2.
The minor number was incremented because the minor number in superagent was incremented.
See superagent changes:
- https://github.com/visionmedia/superagent/releases/tag/v1.5.0
- https://github.com/visionmedia/superagent/releases/tag/v1.6.1
- https://github.com/visionmedia/superagent/releases/tag/v1.7.0
- https://github.com/visionmedia/superagent/releases/tag/v1.7.1
- https://github.com/visionmedia/superagent/releases/tag/v1.7.2
Fix eager option, add request reference to response
The eager
option was broken in v7, see this issue. Your application using Cycle HTTP v7 may perhaps depend on that broken behavior, that's why this version is a major increment.
We also added a backwards-compatible feature: every response
object emitted by response$
Observables has a pointer to the request object that originated it. Example:
response$.subscribe(response => {
console.log(response.request.method); // 'GET'
});
This is the same object that is attached to the response$
Observable:
console.log(response$.request.method); // 'GET'
v7.0.0 Cycle Nested
Cycle Nested
Cycle Nested is a new version of Cycle.js with a focus on hard-core reusability: any Cycle.js app can be easily reused in a larger Cycle.js app.
New documentation site at cycle.js.org.
Cycle Nested consists of:
- Cycle Core v6.0.0 or higher
- Cycle HTTP Driver v7.0.0 or higher
- Cycle DOM v8.0.0 or higher
isolate()
, a helper library for components- Other compatible drivers
NEW HTTP Driver features in Cycle Nested:
- Components are simply Cycle.js apps (
main()
renamed to e.g.Button()
) that can be reused in larger apps. - The HTTP Source,
response$$
, has two new functions attached to it:isolateSource()
andisolateSink
. Read more about isolation.
Allow DELETE as request method
Update peer dependency Cycle Core to v5.0
RxJS updated to v4.0
autoSubscribe option becomes eager, false by default
Renames autoSubscribe
option to eager
. Adds per-request eager
option. Default is false
in both cases. Default used to be true
.
Before | After |
---|---|
makeHTTPDriver() |
makeHTTPDriver({eager: true}) |
makeHTTPDriver({autoSubscribe:true}) |
makeHTTPDriver({eager: true}) |
makeHTTPDriver({autoSubscribe:false}) |
makeHTTPDriver({eager: false}) or makeHTTPDriver() |
In v4.0.0, each request may set its own eager
option that overrides the global factory-set option.
var request$ = Rx.Observable.just({
url: uri + '/pet',
method: 'POST',
send: {name: 'Woof', species: 'Dog'},
eager: true // <-----
});
Add autoSubscribe option to driver factory
You can affect whether the request Observable will be automatically subscribed when calling httpDriver(request$)
by giving the autoSubscribe
option to the factory: makeHTTPDriver({autoSubscribe: true})
. Default value for autoSubscribe
is true
, so to force lazy behavior, call httpDriver = makeHTTPDriver({autoSubscribe: false})
.
Implements to #14.
Update RxJS to v3
Implies a breaking change to Cycle HTTP Driver because RxJS v3 (inside Cycle Core) is a breaking change. Most noteworthy breaking change is the signature change of scan
operator. Read more here.