Skip to content

refactor(http): use Rx Observables in XHR backend#4376

Closed
robwormald wants to merge 1 commit into
angular:masterfrom
robwormald:refactor/xhr-backend
Closed

refactor(http): use Rx Observables in XHR backend#4376
robwormald wants to merge 1 commit into
angular:masterfrom
robwormald:refactor/xhr-backend

Conversation

@robwormald
Copy link
Copy Markdown
Contributor

BREAKING CHANGE: Http now returns Rx Observables directly, so calling .toRx() is no longer necessary. Additionally, Http calls are now cold, so backend requests will not fire unless .subscribe() is called.

Refactors XHR and JSONP backends to use RxJS Observables instead of EventEmitter implementation.

closes #4043 and closes #2974

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does ES6-style import not work here?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the culprit in the typings failure, because TypeScript doesn't recognize Observable as a type here, just a variable.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was going to ask - previously this had been CJS style, this is TS style, but ES6 style could be done.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore me. For now, just set observable types to "any"

@jeffbcross
Copy link
Copy Markdown
Contributor

Left some comments, but LGTM!

@robwormald robwormald force-pushed the refactor/xhr-backend branch 5 times, most recently from f7f6eab to 731b61f Compare September 27, 2015 02:30
BREAKING CHANGE: Http now returns Rx Observables directly, so calling .toRx() is no longer necessary. Additionally, Http calls are now cold, so backend requests will not fire unless .subscribe() is called.

closes angular#4043 and closes angular#2974
@robwormald
Copy link
Copy Markdown
Contributor Author

@jeffbcross comments addressed, jsonp_backend added as well. All green.

@jeffbcross jeffbcross added the action: merge The PR is ready for merge by the caretaker label Sep 27, 2015
@mary-poppins
Copy link
Copy Markdown

Merging PR #4376 on behalf of @jeffbcross to branch presubmit-jeffbcross-pr-4376.

@mary-poppins mary-poppins removed the action: merge The PR is ready for merge by the caretaker label Sep 27, 2015
@jeffbcross jeffbcross self-assigned this Sep 27, 2015
@robwormald robwormald deleted the refactor/xhr-backend branch September 29, 2015 00:02
@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Http requests should be lazy / cold Observables

4 participants