Sobes.tech
Senior

What is transmitted in the request header during authorization?

sobes.tech AI

Answer from AI

In the header of an HTTP request during authorization, the Authorization field is usually transmitted. The format and content of this field depend on the type of authorization:

  • Basic Auth: Authorization: Basic <base64_encoded_string_of_login:password>
  • Bearer Token (e.g., JWT): Authorization: Bearer <token>
  • API Key: sometimes transmitted in the header, for example, Authorization: ApiKey <key> or in a custom header like X-API-Key.

Example for a Bearer token:

GET /api/data HTTP/1.1
Host: example.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
What is transmitted in the request header during… - sobes.tech