Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Angular 2.0.0-alpha.30 #25

Merged
merged 1 commit into from
Jul 8, 2015
Merged

Conversation

NathanWalker
Copy link
Contributor

No description provided.

mgonto added a commit that referenced this pull request Jul 8, 2015
Update to Angular 2.0.0-alpha.30
@mgonto mgonto merged commit 8c15345 into auth0-blog:master Jul 8, 2015
@mgonto
Copy link
Contributor

mgonto commented Jul 8, 2015

Thanks :).

@PatrickJS
Copy link
Contributor

you can replace fetch with Http now that the headers work

@mgonto
Copy link
Contributor

mgonto commented Jul 8, 2015

Yep. I will. Thanks @gdi2290

@PatrickJS
Copy link
Contributor

for example

    window.fetch(url, {
      method: 'GET',
      headers: {
        'Accept': 'application/json',
        'Content-Type': 'application/json',
        'Authorization': 'bearer ' + this.jwt
      }
    })
    .then(status)
    .then(text)
    .then((response) => {
      this.response = response;
    })
    .catch((error) => {
      this.response = error.message;
    });
    http.get(url, {
      headers: {
        'Accept': 'application/json',
        'Content-Type': 'application/json',
        'Authorization': 'bearer ' + this.jwt
      }
    })
    .toRx()
    .map(status)
    .map(text)
    .subscribe(
      response => {
        this.response = response;
      },
      error => {
        this.response = error.message;
      }
    )

@NathanWalker
Copy link
Contributor Author

Oh thanks @ctindel, I think we do need to do that right @mgonto?

@mgonto
Copy link
Contributor

mgonto commented Jul 10, 2015

Yep we do :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants