Skip to content

Global headers ​

Use global headers to add the same headers to every new request, such as an API version or a request ID.

Set the headers ​

Headers are set per application in config/nimbus.php.

php
'applications' => [
    'main' => [
        'name' => 'Main',

        'headers' => [
            'X-App-Version' => '1.0.0',
            'X-Request-ID' => '$uuid',
            'X-Contact' => '$email',
        ],
    ],
],

A value is either a fixed value or one of these generators.

ValueResult
'$uuid'A random UUID.
'$email'A random email address.
'$string'A random string.

How they appear in a request ​

When you open a route in a new tab, Nimbus adds the headers to the Headers tab as normal rows. A generator value is created when the tab is created. Open Headers to change, disable or remove a row for that request.

When you switch to an application with different headers, Nimbus replaces the old global headers in the tab and keeps the headers you added yourself.

For headers that must change on every send, use a dynamic variable such as {$uuid} in the value. See Value generators and variables.