Try-It

Try-It sends real HTTP requests to your API from the endpoint page. This page explains the panel, the proxy behind it and what you can do with a response.

Roles: Any signed-in user with access to the service can send requests. Saving requests and interactions needs a session too. See Saved Requests. AsyncAPI has no Try-It. The tryit feature must be in your license; all built-in tiers include it.

The panel#

Try-It has three tabs. It starts on Request for every endpoint page view and switches to Response automatically once you send.

  • Request: Path, Query, connect and response timeouts, and Body.
  • Headers: a table of request headers. Add and remove rows one at a time.
  • Response: status line, a table of values, a collapsed Response headers block and the body.

The values table is always visible. It shows the time the request was sent, the time the response arrived, the total duration (milliseconds precision, for example 250ms, 1s 250ms or 1m 5s) and the response size.

Choosing an environment#

Next to Send is a list of the service's environments, starting on a Select Environment placeholder. Picking one copies its settings into the form:

  • its base URL is prepended to the Path field (switching environments replaces the old prefix instead of stacking);
  • its connect and response timeouts overwrite the timeout fields;
  • its headers are merged into the Headers table by name, so headers you typed yourself are kept.

The choice is remembered in your browser per user and per service. See Environments.

How requests are sent#

Your browser calls the SelfDocHub proxy, which sends the request to the target. The target URL and the timeouts (1–300 seconds) come from the form. The proxy validates the target URL (scheme http or https, host present, no credentials in the URL) before connecting.

  • Cookie, Authorization and hop-by-hop headers are never forwarded as-is. Authorization is dropped because it carries your own SelfDocHub session. To send an Authorization header to the target, add a row named Authorization in the Headers table; the interface forwards it correctly.
  • Every proxied request carries an X-Doc-Hub: <login> header with the SelfDocHub user who sent it. It overrides any header of the same name you typed.
  • The request body is limited to 1 MiB. The response body is limited by max_tryit_response_bytes (4 MiB by default).
  • Only an allow-list of response headers is returned.

Reading a response#

If the body parses as JSON, it appears under three sub-tabs:

  • Raw: exactly as received. The Copy button appears here on hover or keyboard focus.
  • Pretty: re-serialized with two-space indentation.
  • Tree: an interactive collapsible view of the value. Every node starts collapsed.

A body that is not JSON is shown as raw text.

Concurrent requests#

If an administrator raised max_concurrent_tryit_requests above 1, a Concurrent requests list appears next to Send. Choosing N sends N identical requests in parallel. The Response tab then shows Response 1 … Response N, each filled in as soon as its own request finishes.

Code snippets#

The Code tab shows the current form as a ready-to-run snippet in curl, Go, Python, JavaScript (Node.js 18+), PHP or C# (.NET 6+). Each snippet uses only the language's standard library, prints the status and body, and never includes SelfDocHub's own headers or session token. Turning "Validate SSL" off becomes the language's way of skipping certificate checks. The selected language is remembered. Snippets are highlighted by a small built-in tokenizer that works offline.

OpenRPC#

For OpenRPC methods Try-It works as JSON-RPC. See OpenRPC.

Next steps#

Screenshots

Last updated: