StrikekitStrikekit

api set header

Set a default HTTP header on the Platform api session

Set a header that applies to subsequent API requests in the session (for example auth).

Syntax

When I api set header "<name>" to "<value>"

Qualifiers

QualifierRoleExample
toHeader valueapi set header "Authorization" to "Bearer $API_TOKEN"

Requirements

ItemContract
Element / control shapeNone — HTTP session (Platform: api)
How the label bindsPath / body / headers are payloads ($ENV, slots expand)
Qualifiers that change resolveSee this command’s Qualifiers table
PlatformPlatform: api only — requires $API_BASE_URL (and auth env as needed)
Wrong shape → use insteadUI XHR wait → wait for response. Browser UI → web commands

See also UI contracts and Platform: api.

Examples

When I api set header "Authorization" to "Bearer $API_TOKEN"
When I api set header "Content-Type" to "application/json"

Notes

  • Values expand via shared resolve ($ENV, slots, {{faker}}).
  • Reports redact Authorization and common secret header values.

On this page