You can configure mabl to pass custom HTTP headers with each request in plan runs and in local ad hoc runs. These custom headers may be used for authentication or to exercise some specific behavior of your application.
If a given request already has authorization headers, mabl does not apply any additional authorization headers to it. Adding a custom HTTP header with authorization only works on requests that do not contain authorization headers already.
Adding custom HTTP headers to a plan run
To specify custom HTTP headers for a plan, take the following steps:
- Go to the Plans section.
- Choose a specific plan.
- Click on the pencil icon to open the edit plan page.
- Scroll to the Device settings section.
- Click on Additional settings to open the dropdown menu.
- Toggle on "Send custom HTTP headers."
- Add one or more header key-value pairs.
Adding a custom HTTP header
- Click the Save plan button at the bottom of the page.
Adding custom HTTP headers to Trainer and local runs
To apply custom HTTP headers during training sessions and local runs, open the Preferences menu: Edit > Preferences.
Select the HTTP headers option on the left and add any extra headers as needed. To turn off a header without removing it, uncheck the corresponding checkbox under the "Enabled" column.
Adding custom HTTP headers in the Preferences menu
Configuring custom HTTP headers is not supported for ad hoc cloud runs of a single test.