Configuring request settings
Set the timeout, redirect behavior, proxy and certificate checks for a request or a group of requests.
Overview
Request settings control how Relay sends a request rather than what it sends: how long to wait for the server, whether to follow redirects, whether to use the proxy and whether to check the server's certificate.
You can set them on a request, a folder, a collection or a workspace. Each setting is decided on its own by the closest level that sets it, in this order:
- The request.
- Its folders, innermost first.
- Its collection.
- Its workspace.
- Relay's defaults, in the Requests and Network panes of Relay > Settings.
Drafts skip the folder and collection levels. Set a value once on a collection, for example, and every request in it uses that value unless a folder or the request sets its own.
Change a request's settings
- In the request editor, click Settings, or press Command-7.
- Click the menu next to a setting and choose a value.
Each menu starts on the inherited value, which shows what the request gets and where it comes from, such as "Inherit (On, from Collection “API”)", or "Default (On)" when it comes from Relay's defaults. Choose On or Off to override it. For a number, choose Custom, then enter the value. Choose the inherited value again to go back to it.
Next to an inherited value, click Edit… to change the setting at the level it comes from.
Set the timeout
In the Timeout section, Request Timeout is how long Relay waits for the server without receiving anything before the request fails with "The request timed out." It can be from 1 to 3,600 seconds. The default is 30 seconds, which you can change with Default Timeout in the Requests pane of Relay > Settings.
For a WebSocket request, the setting is called Handshake Timeout, and the Redirects section doesn't appear.
A response that's an event stream uses the Streaming Idle Timeout instead, once it starts streaming. For more information, see Receiving server-sent events.
Control redirects
The Redirects section decides what happens when the server answers with a redirect:
- Follow Redirects: Whether Relay follows redirects. When it's off, the response is the redirect itself. On by default.
- Maximum Redirects: How many redirects Relay follows before the request fails, from 1 to 50. The default is 10.
- Follow Original Method: Whether Relay repeats the original method and body after a 301 or 302, instead of switching to GET. Off by default.
- Keep Authorization Across Origins: Whether Relay sends the
Authorizationheader when a redirect leads to another host, scheme or port. Off by default.
The last three apply only while Follow Redirects is on. For more information, see Following redirects.
Choose how the request connects
The Connection section has two settings:
- Use Proxy: When it's on, the request goes through the proxy chosen in the Network pane of Relay > Settings, if there is one. When it's off, the request connects directly. On by default. For more information, see Routing requests through a proxy.
- Verify Certificates: When it's on, the request fails if the server's TLS certificate isn't trusted. When it's off, Relay accepts an untrusted certificate. On by default. For more information, see Using client and CA certificates.
Important
Set values for a group of requests
To set values for every request in a collection or folder, open its Collection Settings window, for example by Control-clicking it in the sidebar and choosing Edit Variables…, then click Settings in the toolbar. For more information, see Configuring collections and folders.
To set values for a whole workspace, click the workspace menu and choose Edit Workspaces…. Select the workspace, then click Settings in the toolbar.
To change Relay's defaults, use the Requests and Network panes of Relay > Settings, or select Globals in the Workspaces window and click Settings (the gear button).
See Also
- Following redirects: Choose whether Relay follows redirects, how many, and what it sends to the next location.
- Routing requests through a proxy: Send requests directly, through the system proxy or through an HTTP or SOCKS5 proxy.
- Using client and CA certificates: Present client certificates and trust your own certificate authorities.
- Configuring collections and folders: Give a collection or folder variables, authentication, scripts and settings that its requests inherit.