Junior — Middle
Which HTTP header is used to transmit user authorization data?
sobes.tech AI
Answer from AI
The Authorization header is used to transmit user authorization data in HTTP.
It contains information about the type of authorization and the corresponding credentials. For example:
- Basic authorization:
Authorization: Basic <credentials>(where<credentials>is a base64-encoded string ofusername:password) - Bearer token:
Authorization: Bearer <token>
Example:
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
This header allows the server to identify and authenticate the user during requests.