You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/api-management/forward-request-policy.md
+11-2Lines changed: 11 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ The `forward-request` policy forwards the incoming request to the backend servic
35
35
| timeout | The amount of time in seconds to wait for the HTTP response headers to be returned by the backend service before a timeout error is raised. Minimum value is 0 seconds. Values greater than 240 seconds may not be honored, because the underlying network infrastructure can drop idle connections after this time. Policy expressions are allowed. You can specify either `timeout` or `timeout-ms` but not both. | No | 300 |
36
36
| timeout-ms | The amount of time in milliseconds to wait for the HTTP response headers to be returned by the backend service before a timeout error is raised. Minimum value is 0 ms. Policy expressions are allowed. You can specify either `timeout` or `timeout-ms` but not both. | No | N/A |
37
37
| continue-timeout | The amount of time in seconds to wait for a `100 Continue` status code to be returned by the backend service before a timeout error is raised. Policy expressions are allowed. | No | N/A |
38
-
| http-version | The HTTP spec version to use when sending the HTTP response to the backend service. When using `2or1`, the gateway will favor HTTP /2 over /1, but fall back to HTTP/1 if HTTP/2 doesn't work. | No | 1 |
38
+
| http-version | The HTTP protocol version to use when sending the HTTP request to the backend service: <br> - `1`: HTTP/1 <br> - `2`: HTTP/2 <br/> - `2or`: The gateway favors HTTP/2 over HTTP/1, but falls back to HTTP/1 if HTTP/2 doesn't work.<br/><br/> HTTP/2 support is in preview for only the self-hosted gateway and the v2 gateway. See [Usage notes](#usage-notes) for details. | No | 1 |
39
39
| follow-redirects | Specifies whether redirects from the backend service are followed by the gateway or returned to the caller. Policy expressions are allowed. | No |`false`|
40
40
| buffer-request-body | When set to `true`, request is buffered and will be reused on [retry](retry-policy.md). | No |`false`|
41
41
| buffer-response | Affects processing of chunked responses. When set to `false`, each chunk received from the backend is immediately returned to the caller. When set to `true`, chunks are buffered (8 KB, unless end of stream is detected) and only then returned to the caller.<br/><br/>Set to `false` with backends such as those implementing [server-sent events (SSE)](how-to-server-sent-events.md) that require content to be returned or streamed immediately to the caller. Policy expressions aren't allowed. | No |`true`|
@@ -48,6 +48,16 @@ The `forward-request` policy forwards the incoming request to the backend servic
* Use the `http-version` attribute in this policy to enable the HTTP/2 protocol outbound from the gateway to the backend. Set the attribute to `2or1` or `2`. Currently, HTTP/2 support is in preview for only the self-hosted gateway and the v2 gateway.
54
+
55
+
> [!IMPORTANT]
56
+
> In the v2 gateway, HTTP/2 is not supported end-to-end (that is, both inbound to API Management and outbound to the backend). HTTP/2-specific features such as trailers are dropped by the v2 gateway.
57
+
58
+
* In the self-hosted gateway, end-to-end HTTP/2 protocol support is required for [gRPC APIs](grpc-api.md).
59
+
60
+
51
61
## Examples
52
62
53
63
### Send request to HTTP/2 backend
@@ -69,7 +79,6 @@ The following API level policy forwards all API requests to an HTTP/2 backend se
69
79
</policies>
70
80
```
71
81
72
-
This is required for HTTP /2 or gRPC workloads and currently only supported in self-hosted gateway. Learn more in our [API gateway overview](api-management-gateways-overview.md).
Copy file name to clipboardExpand all lines: articles/api-management/grpc-api.md
+10-1Lines changed: 10 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ author: dlepow
6
6
7
7
ms.service: azure-api-management
8
8
ms.topic: how-to
9
-
ms.date: 05/06/2024
9
+
ms.date: 07/21/2025
10
10
ms.author: danlep
11
11
ms.custom:
12
12
- devx-track-arm-template
@@ -25,6 +25,7 @@ To add a gRPC API to API Management, you need to:
25
25
26
26
* Upload the API's Protobuf (protocol buffer) definition file to API Management
27
27
* Specify the location of your gRPC service
28
+
* Enable HTTP/2 support in the self-hosted gateway
28
29
* Configure the API in API Management
29
30
30
31
API Management supports pass-through with the following types of gRPC service methods: unary, server streaming, client streaming, and bidirectional streaming. For background about gRPC, see [Introduction to gRPC](https://grpc.io/docs/what-is-grpc/introduction/).
@@ -76,6 +77,14 @@ API Management supports pass-through with the following types of gRPC service me
76
77
77
78
---
78
79
80
+
## Enable HTTP/2 support in the self-hosted gateway
81
+
82
+
gRPC requires HTTP/2 transport end to end (that is, both inbound to API Management and outbound from the gateway to the backend).
83
+
84
+
* The self-hosted gateway supports inbound HTTP/2 by default.
85
+
86
+
* Enable HTTP/2 protocol outbound support in the self-hosted gateway by setting the `http-version` attribute to `2` or `2or1` in the [forward-request](forward-request-policy.md) policy.
87
+
79
88
## Call gRPC services with .NET
80
89
81
90
For information about calling gRPC services with .NET, see the following articles:
0 commit comments