HTTP/2 is the latest version of the Hypertext Transfer Protocol (HTTP), offering significant improvements over HTTP/1.1 in terms of performance, security, and efficiency. It introduces features like multiplexing, header compression, and server push to reduce latency and improve page load times.Turn On Compatibility Switch#
You can request HTTP/2 APIs directly within an HTTP project, but you need to ensure that the HTTP/2 compatibility switch is enabled in Settings β Feature Settings β Advanced Settings.After enabling the compatibility switch, when requesting HTTP/2 APIs, Apidog will automatically upgrade the request protocol to HTTP/2.You can test HTTP/2 support using this sample API: https://http2.pro/api/v1
More Settings#
You can manually configure HTTP/2 settings in Settings β Advanced Settings. It is recommended to use Apidog's default configuration to ensure maximum compatibility with various APIs.Configuration Options#
The following table outlines the available HTTP/2 configuration options:| Protocol | Setting | Description |
|---|
| HTTPS | HTTP/2 ALPN | Default option. Apidog will attempt to establish a connection using the HTTP/2 protocol. If the API does not support it, it will automatically fall back to HTTP/1.1. |
| HTTPS | HTTP/1.1 | Use the original HTTP connection method and do not use the HTTP/2 protocol. |
| HTTP | HTTP/1.1 | Default option. Establish a connection using the HTTP/1.1 protocol and send requests using HTTP/1.1. |
| HTTP | HTTP/2 Prior Knowledge | Establish an h2c connection. If the API does not support the HTTP/2 protocol, the connection will fail directly without automatically falling back to HTTP/1.1. |
ALPN (Application-Layer Protocol Negotiation) allows the client and server to negotiate which protocol to use during the TLS handshake, ensuring seamless HTTP/2 support when available.
When using HTTP/2 Prior Knowledge for HTTP connections, ensure your API server explicitly supports h2c. This setting does not provide automatic fallback to HTTP/1.1 if the connection fails.