Authorization
Authorization is a way that allows you to add authentication headers to the request.
Currently, supports Bearer
and Basic
authorization.
Bearer
The bearer authorization is used to add a bearer token to the request. The token is added to the Authorization
header.
You can also pass a function that returns a string.
The function will be called only once when the request is made. If it returns undefined, the header will not be added to the request.
Basic
The basic authorization is used to add a basic authentication to the request. The username and password are added to the Authorization
header.