X Tutup
Skip to content

chore(http): fix Http Response type#5017

Closed
robwormald wants to merge 2 commits intoangular:masterfrom
robwormald:fix/httptypes
Closed

chore(http): fix Http Response type#5017
robwormald wants to merge 2 commits intoangular:masterfrom
robwormald:fix/httptypes

Conversation

@robwormald
Copy link
Copy Markdown
Contributor

use Observable for Http responses

@robwormald
Copy link
Copy Markdown
Contributor Author

@pkozlowski-opensource this should also prevent Rx from being double-built into the bundles

@robwormald robwormald added this to the beta-00 milestone Oct 30, 2015
@robwormald robwormald added the action: review The PR is still awaiting reviews from at least one requested reviewer label Oct 30, 2015
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 should be split into a separate commit (same PR)

@jeffbcross
Copy link
Copy Markdown
Contributor

The commit message should be fix(...) instead of chore.

@jeffbcross
Copy link
Copy Markdown
Contributor

Looks good with cleanup!

@jeffbcross jeffbcross added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews pr_state: LGTM and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Oct 30, 2015
@jeffbcross jeffbcross assigned robwormald and unassigned jeffbcross Oct 30, 2015
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.

unused import

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.

👍 fixed

@robwormald robwormald force-pushed the fix/httptypes branch 2 times, most recently from 00559f1 to 48a80d6 Compare October 31, 2015 06:17
Return Response when JSONP backend errors
@robwormald
Copy link
Copy Markdown
Contributor Author

this surfaced an issue with RxJS typings on operators : ReactiveX/rxjs#635 - investigating. Means that this works fine:

http.get('/foo').subscribe(res => console.log(res.json());

but this complains:

http.get('/foo')
  .map(res => res.json()) //error: res (any) does not have property .json()
  .subscribe(foos => console.log(foos));

temporary workaround is to cast to response:

http.get('/foo')
  .map((res:Response) => res.json()) //ok
  .subscribe(foos => console.log(foos))

which kind of defeats the purpose 😿

use correct type definitions for Http responses.
@robwormald
Copy link
Copy Markdown
Contributor Author

@jeffbcross issues addressed, reordered the commits. issue above is non-blocking I think, so lets merge to get @pkozlowski-opensource unblocked on bundle stuff. give this a once over if you would.

@jeffbcross jeffbcross added action: review The PR is still awaiting reviews from at least one requested reviewer and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Nov 4, 2015
@jeffbcross jeffbcross assigned jeffbcross and unassigned robwormald Nov 4, 2015
@jeffbcross jeffbcross added the action: merge The PR is ready for merge by the caretaker label Nov 4, 2015
@mary-poppins
Copy link
Copy Markdown

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

@mary-poppins mary-poppins removed the action: merge The PR is ready for merge by the caretaker label Nov 4, 2015
@jeffbcross
Copy link
Copy Markdown
Contributor

@robwormald merging!

@pkozlowski-opensource
Copy link
Copy Markdown
Member

Yay!

@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.

Labels

action: review The PR is still awaiting reviews from at least one requested reviewer cla: yes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

X Tutup