Bearer token from environment
20-http-bearer-env.yaml
HTTP(S)
What this example does
This example demonstrates bearer token from environment.
Checks and behavior
- Sends an GET request to https://api.example.invalid/private.
- Checks allowed/denied HTTP status codes.
- TLS settings cover certificate trust.
Adapt example domains, addresses, credentials and thresholds to your environment before use.
YAML configuration
name: Bearer token from environment
url: https://api.example.invalid/private
request:
method: GET
auth:
type: bearer
token_env: HTTPTEST_API_TOKEN
tls:
verify: true
tests:
status:
allow: [200]