All Products
Search
Document Center

Function Compute:Why does the first letter of the header key become uppercase when I use an HTTP trigger to invoke a function?

Last Updated:Jan 20, 2025

HTTP headers are represented as key-value pairs. According to HTTP specifications, header keys are case-insensitive.

When you use an HTTP trigger to invoke a function that runs in a built-in runtime, Function Compute 3.0 converts the HTTP request into the event format of the HTTP trigger. During this process, the HTTP header key is normalized based on the net/http standard library in Go.

While the header keys themselves are case-insensitive, the normalization process capitalizes the first letter of the header and each of the hyphenated words within the header. For example, "accept-encoding" is transformed to "Accept-Encoding".