René's URL Explorer Experiment


Title: refactor(http): convert Connection interface to be Observable of Response · Issue #4472 · angular/angular · GitHub

Open Graph Title: refactor(http): convert Connection interface to be Observable of Response · Issue #4472 · angular/angular

X Title: refactor(http): convert Connection interface to be Observable of Response · Issue #4472 · angular/angular

Description: (recapping discussion with @Blesh, who will probably correct me) Current State Right now, the Connection interface, which is implemented by XHRConnection, JSONPConnection, and MockConnection, has simple interface: interface Connection { ...

Open Graph Description: (recapping discussion with @Blesh, who will probably correct me) Current State Right now, the Connection interface, which is implemented by XHRConnection, JSONPConnection, and MockConnection, has s...

X Description: (recapping discussion with @Blesh, who will probably correct me) Current State Right now, the Connection interface, which is implemented by XHRConnection, JSONPConnection, and MockConnection, has s...

Opengraph URL: https://github.com/angular/angular/issues/4472

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"refactor(http): convert Connection interface to be Observable of Response","articleBody":"(recapping discussion with @blesh, who will probably correct me)\n## Current State\n\nRight now, the [`Connection`](https://github.com/angular/angular/blob/a251df9df4a34592afb4984f7a3e13a186562234/modules/angular2/src/http/interfaces.ts#L22) interface, which is implemented by `XHRConnection`, `JSONPConnection`, and `MockConnection`, has simple interface:\n\n``` typescript\ninterface Connection {\n  readyState: ReadyStates;\n  request: Request;\n  response: Observable\u003cResponse\u003e;\n}\n```\n\nCalls to the [Http](https://github.com/angular/angular/blob/a251df9df4a34592afb4984f7a3e13a186562234/modules/angular2/src/http/http.ts) service return the `connection.response` observable, so end users don't really interact with this interface too much in application code. In tests, however, users will be working with `MockConnection` instances created by [`MockBackend`](https://github.com/angular/angular/blob/a251df9df4a34592afb4984f7a3e13a186562234/modules/angular2/src/http/backends/mock_backend.ts) in order to create mock responses for requests.\n\n``` typescript\nmyService.getUsers().subscribe(users =\u003e {\n  expect(users[0].name).toBe('Rob');\n  async.done();\n});\nmockBackend.connections.subscribe(connection =\u003e {\n  connection.mockRespond(mockUsers);\n});\n```\n\n(Note that the mock responding mechanism should be further improved, but that's outside the scope of this proposal).\n## Proposal\n\nChange `Connection` itself to be an Observable of `Response`, and keep `request` property intact. @blesh says it aint so bad to add properties to Observables (though adding methods is a bad idea because observable methods are expected to be operators).\n\n``` typescript\ninterface Connection extends Observable\u003cResponse\u003e { //Observable interface doesn't actually exist yet\n  readyState: ReadyStates; // I would like to get rid of this property\n  request: Request;\n}\n```\n\n`MockConnection` should extend subject, so that it can be `next`-ed with `Response`s.\n\n``` typescript\nclass MockConnection extends Subject\u003cResponse\u003e implements Connection {\n  readyState: ReadyStates;\n  request: Request;\n}\n```\n\nThis change is actually pretty minor from an end-user perspective, other than the change of calling `next` on the `MockConnection` rather than the current `mockRespond`. But internally, it reduces cruft and simplifies logic.\n\nCC: @robwormald \n","author":{"url":"https://github.com/jeffbcross","@type":"Person","name":"jeffbcross"},"datePublished":"2015-10-02T18:28:04.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/4472/angular/issues/4472"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:e6d00278-f2a1-2ae5-5e9a-66eea0f119e8
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB7AC:A0916:221B35:2DC2E4:6A615E67
html-safe-nonce81c34ba431d5643b89178ac57e9b36b85092666ee521d66effecab53c2c9da48
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCN0FDOkEwOTE2OjIyMUIzNToyREMyRTQ6NkE2MTVFNjciLCJ2aXNpdG9yX2lkIjoiNTE1NTgxOTEzMzQ5OTE3MDQwNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac6f033274d1f5f6f8262bebd14627fbd55971473534f95c612c0555d8a5813a5e
hovercard-subject-tagissue:109546106
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/4472/issue_layout
twitter:imagehttps://opengraph.githubassets.com/afc1f5ed82aff8bfb8bc34d855cc0f2a067ca6b52627c5e3255f29c0828b396d/angular/angular/issues/4472
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/afc1f5ed82aff8bfb8bc34d855cc0f2a067ca6b52627c5e3255f29c0828b396d/angular/angular/issues/4472
og:image:alt(recapping discussion with @Blesh, who will probably correct me) Current State Right now, the Connection interface, which is implemented by XHRConnection, JSONPConnection, and MockConnection, has s...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejeffbcross
hostnamegithub.com
expected-hostnamegithub.com
Nonec258d2b06b498220e3b94af28b26bbbf58f4203a6373725f779afcc867afd263
turbo-cache-controlno-preview
go-importgithub.com/angular/angular git https://github.com/angular/angular.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id24195339
octolytics-dimension-repository_nwoangular/angular
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id24195339
octolytics-dimension-repository_network_root_nwoangular/angular
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release5f67bc431418961e0814f1eb30a4231250e4726d
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/angular/angular/issues/4472#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F4472
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F4472
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=angular%2Fangular
Reloadhttps://github.com/angular/angular/issues/4472
Reloadhttps://github.com/angular/angular/issues/4472
Reloadhttps://github.com/angular/angular/issues/4472
Please reload this pagehttps://github.com/angular/angular/issues/4472
angular https://github.com/angular
angularhttps://github.com/angular/angular
Notifications https://github.com/login?return_to=%2Fangular%2Fangular
Fork 27.5k https://github.com/login?return_to=%2Fangular%2Fangular
Star 101k https://github.com/login?return_to=%2Fangular%2Fangular
Code https://github.com/angular/angular
Issues 978 https://github.com/angular/angular/issues
Pull requests 161 https://github.com/angular/angular/pulls
Discussions https://github.com/angular/angular/discussions
Actions https://github.com/angular/angular/actions
Projects https://github.com/angular/angular/projects
Security and quality 24 https://github.com/angular/angular/security
Insights https://github.com/angular/angular/pulse
Code https://github.com/angular/angular
Issues https://github.com/angular/angular/issues
Pull requests https://github.com/angular/angular/pulls
Discussions https://github.com/angular/angular/discussions
Actions https://github.com/angular/angular/actions
Projects https://github.com/angular/angular/projects
Security and quality https://github.com/angular/angular/security
Insights https://github.com/angular/angular/pulse
refactor(http): convert Connection interface to be Observable of Responsehttps://github.com/angular/angular/issues/4472#top
https://github.com/robwormald
effort2: dayshttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22effort2%3A%20days%22
refactoringIssue that involves refactoring or code-cleanuphttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22refactoring%22
https://github.com/jeffbcross
jeffbcrosshttps://github.com/jeffbcross
on Oct 2, 2015https://github.com/angular/angular/issues/4472#issue-109546106
@Bleshhttps://github.com/Blesh
Connectionhttps://github.com/angular/angular/blob/a251df9df4a34592afb4984f7a3e13a186562234/modules/angular2/src/http/interfaces.ts#L22
Httphttps://github.com/angular/angular/blob/a251df9df4a34592afb4984f7a3e13a186562234/modules/angular2/src/http/http.ts
MockBackendhttps://github.com/angular/angular/blob/a251df9df4a34592afb4984f7a3e13a186562234/modules/angular2/src/http/backends/mock_backend.ts
@Bleshhttps://github.com/Blesh
@robwormaldhttps://github.com/robwormald
robwormaldhttps://github.com/robwormald
effort2: dayshttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22effort2%3A%20days%22
refactoringIssue that involves refactoring or code-cleanuphttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22refactoring%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.