Ajax getResponseHeader

Hello to all,
I’m using F7 ver2 to do an Ajax call and I want to get the Response header.
In jquery I use getResponseHeader(‘token’). In F7 how I can do that?

Thank you

1 Like
var xhr = app.request.get('somepage.html');
1 Like

Hello Vladimir,
I have the above code:

var xhr = app.request({ method: "POST", url: "THE_URL", data:"USERNAME/PASSWORD",success: function(data) {},error: function(xhr) {}

In my browser Network response I can see the Token, but the console.log is null.

Am I doing something wrong?

Thank you

I guess it should be done after request happened

var xhr = app.request({
  success: function(data, status, xhr) {

Thank you!!
It worked!!