Question
How does setting the 'Authorization' header correctly resolve a 401 error?
Asked by: USER1985
74 Viewed
74 Answers
Answer (74)
The 'Authorization' header is crucial for authentication. It should be formatted correctly, typically as 'Bearer ' for bearer token authentication or 'Basic ' for basic authentication. Incorrect formatting or a missing header will result in a 401 error.