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
varclient=newPostsClient(adapter); // the name of the client will vary based on your generation parameters
56
56
```
57
+
58
+
## Middleware handlers
59
+
60
+
The following table describes which middleware handlers are implemented by the HTTP package, and which ones are included by default with any new request adapter.
61
+
62
+
| Name | Description | C# Support | Go Support | Java Support | TypeScript Support | PHP Support | Python Support |
| Authorization | Adds an access token to the request when using a native HTTP client. | Yes | No | Yes | No | No | No |
65
+
| Body Inspection | Allows the client application to inspect the request and response body through the associated options. | No | No | No | No | No | No |
66
+
| Chaos | For testing purposes only. Randomly fails requests to allow testing clients' resilience. | Yes | Yes | Yes | Yes | Yes | No |
67
+
| Headers Inspection | Allows the client application to inspect the request and response headers through the associated options. | Default | Default | Default | Default | Default | Default |
68
+
| Parameters Name Decoding | Decodes query parameter names that were encoded when building the URL because they contained characters not allowed by RFC 6570. | Default | Default | Default | Default | Default | Default |
69
+
| Redirect | Automatically follows Location response headers when a **301** or **302** response status code is received. | Default | Default | Default | Default | Default | Default |
70
+
| Request Compression | Compresses request bodies and retries requests without compression when a **415** response status code is received. | No | Default | No | Default | No | No |
71
+
| Response Decompression | Adds an **Accept-Encoding** request header and decompresses any response body with a **Content-Encoding** response header. | N/A | N/A | N/A | N/A | N/A | N/A |
72
+
| Retry | Automatically retries requests when a **429** or a **503** response status code is received. | Default | Default | Default | Default | Default | Default |
73
+
| Sunset | Logs a warning message with Open Telemetry upon receiving a **Sunset** response header. | No | No | No | No | No | No |
74
+
| Telemetry | Adds an extension point to augment the request with telemetry headers. | Yes | No | No | Yes | Yes | No |
75
+
| Uri Replacement | Enables replacement of segments of the request URI before it's sent out. | Default | Yes | Default | Yes | Yes | Default |
76
+
| User Agent | Adds the kiota http library version to the user agent request header. | Default | Default | Default | Default | Default | Default |
77
+
78
+
> [!NOTE]
79
+
> Languages with **N/A** in the response decompression column leverage the native response decompression offered by the HTTP client instead.
80
+
81
+
> [!NOTE]
82
+
> Languages with **Default** for the handler support value include the handler by default when creating the request adapter with no additional configuration.
83
+
84
+
> [!NOTE]
85
+
> Request body decompression is not enabled by default in ASP.NET Core APIs and needs to be enabled. Find out how to enable it with [Request Decompression in ASP.NET core](/aspnet/core/fundamentals/middleware/request-decompression).
0 commit comments