Creating an HTTP Function

Overview

HTTP functions are designed to optimize web services and support multiple programming languages. You can send HTTP requests to URLs to trigger function execution.

Common Function Request Headers

The following table lists the default request header fields of an HTTP function.

Table 1 Default request header fields

Field

Description

X-CFF-Request-Id

ID of the current request

X-CFF-Memory

Allocated memory

X-CFF-Timeout

Function timeout duration

X-CFF-Func-Version

Function version

X-CFF-Func-Name

Function name

X-CFF-Project-Id

Project ID

X-CFF-Package

App to which the function belongs

X-CFF-Region

Current region

Constraints

Creating and Configuring an HTTP Function

The following uses an example to describe how to create and configure an HTTP function.