Title: Http requests should be lazy / cold Observables · Issue #4043 · angular/angular · GitHub
Open Graph Title: Http requests should be lazy / cold Observables · Issue #4043 · angular/angular
X Title: Http requests should be lazy / cold Observables · Issue #4043 · angular/angular
Description: As Http is Observable powered, it makes more semantic sense for requests to be "lazy", that is, nothing should happen until .subscribe is called somewhere downrange. Currently, calling http.get(url) will immediately fire off an XHR, irre...
Open Graph Description: As Http is Observable powered, it makes more semantic sense for requests to be "lazy", that is, nothing should happen until .subscribe is called somewhere downrange. Currently, calling http.get(url...
X Description: As Http is Observable powered, it makes more semantic sense for requests to be "lazy", that is, nothing should happen until .subscribe is called somewhere downrange. Currently, calling ht...
Opengraph URL: https://github.com/angular/angular/issues/4043
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Http requests should be lazy / cold Observables","articleBody":"As Http is Observable powered, it makes more semantic sense for requests to be \"lazy\", that is, nothing should happen until .subscribe is called somewhere downrange. \n\nCurrently, calling `http.get(url)` will immediately fire off an XHR, irrespective of whether or not the request has been subscribed to. This is probably a side-effect of the EventEmitter using a Subject (and thus could be resolved when RxNext goes in) - generally we should opt for Observables for such things and only use Subjects when necessary. \n\nSee http://plnkr.co/edit/ncg5Kx?p=preview for a reproduction / naive semantically better implementation. \n\nSuggested fix would be having backends etc initialize and return an Observable that could be .mapped to the Response\n","author":{"url":"https://github.com/robwormald","@type":"Person","name":"robwormald"},"datePublished":"2015-09-08T07:21:22.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/4043/angular/issues/4043"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:50e094d2-d4b1-41dc-8a71-7c62f2ee30e6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 93B6:3F5F2A:5C303E:7A68EB:6A5FCEC6 |
| html-safe-nonce | 3f6f31bdfecbe093257d1b24be131c9cbb3722902ae9449531d083688dd88532 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5M0I2OjNGNUYyQTo1QzMwM0U6N0E2OEVCOjZBNUZDRUM2IiwidmlzaXRvcl9pZCI6IjI3NTE0MTEwODYxOTUyOTkyNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6315286ee146aac9a1fd489abc7be33dc7bbbc332e7848cb1f79e075e3afe45b |
| hovercard-subject-tag | issue:105317143 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/4043/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fb8a05f24030e1effb00144a9e704375edde061c548f043f8c6cb5a840950860/angular/angular/issues/4043 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fb8a05f24030e1effb00144a9e704375edde061c548f043f8c6cb5a840950860/angular/angular/issues/4043 |
| og:image:alt | As Http is Observable powered, it makes more semantic sense for requests to be "lazy", that is, nothing should happen until .subscribe is called somewhere downrange. Currently, calling http.get(url... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | robwormald |
| hostname | github.com |
| expected-hostname | github.com |
| None | 53a28a7799cbf673993ab89fc44869fea4c4a6545a861a4d1445e83e8d03aabd |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | dc08399f879d576f0edbb8c52a0a1a30d498b203 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width