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
The `HttpApiEndpoint.setHeaders` method allows you to define the expected structure of request headers. You can specify the schema for each header and include additional metadata, such as descriptions.
553
+
Use `HttpApiEndpoint.setHeaders` to declare a single, cumulative schema that describes all expected request headers.
554
+
Provide one struct schema where each header name maps to its validator, and you can attach metadata such as descriptions.
554
555
555
-
**Example** (Defining Request Headers with Metadata)
556
+
> [!IMPORTANT]
557
+
> All headers are normalized to lowercase. Always use lowercase keys in the headers schema.
558
+
559
+
**Example** (Describe and validate custom headers)
The server validates these headers against the declared schema before handling the request.
598
+
582
599
## Defining a HttpApiGroup
583
600
584
601
You can group related endpoints under a single entity by using `HttpApiGroup.make`. This can help organize your code and provide a clearer structure for your API.
0 commit comments