Skip to content

Fix eager option, add request reference to response

Compare
Choose a tag to compare
@staltz staltz released this 25 Jan 16:54
· 50 commits to master since this release

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'