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

How to access response headers #30

Closed
se1exin opened this issue Jul 9, 2016 · 2 comments
Closed

How to access response headers #30

se1exin opened this issue Jul 9, 2016 · 2 comments

Comments

@se1exin
Copy link

se1exin commented Jul 9, 2016

Sorry if this has been answered but could not find by searching..

I need to access a custom response header (Date) in my ajax calls, how do I go about this?

@se1exin
Copy link
Author

se1exin commented Jul 10, 2016

Figured it out: - use xhr.getResponseHeader('Date')

promise.get(this.path, params, {"Accept": "application/json"})
    .then(function(error, response, xhr) {
         var date = xhr.getResponseHeader('Date');
});

@se1exin se1exin closed this as completed Jul 10, 2016
@stackp
Copy link
Owner

stackp commented Jul 14, 2016

Indeed!

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

No branches or pull requests

2 participants