if (response.status === 200) { const token = response.headers.get(‘Authorization’); but token come null;
My C# Api:
HttpContext.Response.Headers.Add(“Authorization”, user.Token);
return Ok(userResponse);
This time return 200(OK), and I see network tab this Authorization header, but when trying to take it in Js react,token was came null, but I see Network tab response.header:
How to get Authorization token by response header:
Please help me!!!
if (response.status === 200) { const token = response.headers.get(‘Authorization’); if (response.status === 200) { const token = response.headers.get(‘Authorization’); but token come null;
aaaaa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.