Skip to content

fix(http) : set response.ok based on given status code#8056

Closed
nexus-uw wants to merge 1 commit into
angular:masterfrom
nexus-uw:http/fix-ok
Closed

fix(http) : set response.ok based on given status code#8056
nexus-uw wants to merge 1 commit into
angular:masterfrom
nexus-uw:http/fix-ok

Conversation

@nexus-uw
Copy link
Copy Markdown

@nexus-uw nexus-uw commented Apr 13, 2016

  • Please check if the PR fulfills these requirements
  • The commit message follows our guidelines: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit-message-format
  • Tests for the changes have been added (for bug fixes / features)
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
    bug fix
  • What is the current behavior? (You can also link to an open issue here)
    response.ok is not defined
  • What is the new behavior (if this is a feature change)?
    response.ok is set to true if status is 200-299 (as already documented)

closes #6503

constructor(responseOptions: ResponseOptions) {
this._body = responseOptions.body;
this.status = responseOptions.status;
this.ok = (this.status >= 200 && this.status <= 299);
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.

I think success would be a better field name.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

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.

OK, let's follow the spec.

@mhevery
Copy link
Copy Markdown
Contributor

mhevery commented Apr 17, 2016

Please address the comment. looks good otherwise.

@mhevery mhevery added pr_state: LGTM action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews action: merge The PR is ready for merge by the caretaker 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 Apr 17, 2016
@mary-poppins
Copy link
Copy Markdown

Merging PR #8056 on behalf of @robertmesserle to branch presubmit-robertmesserle-pr-8056.

@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 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker cla: yes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants