Skip to content

Commit c787622

Browse files
Grammar and style refinements
1 parent fb4947b commit c787622

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

articles/azure-functions/functions-custom-handlers.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The following diagram shows the relationship between the Functions host and a we
2727

2828
![Azure Functions custom handler overview](./media/functions-custom-handlers/azure-functions-custom-handlers-overview.png)
2929

30-
- Events trigger a request sent to the Functions host. The event carries either a raw HTTP payload (for HTTP-triggered functions), or a payload that holds the input binding data for the function.
30+
- Events trigger a request sent to the Functions host. The event carries either a raw HTTP payload (for HTTP-triggered functions with no bindings), or a payload that holds input binding data for the function.
3131
- The Functions host then proxies the request to the web server by issuing a [request payload](#request-payload).
3232
- The web server executes the individual function, and returns a [response payload](#response-payload) to the Functions host.
3333
- The Functions host proxies the response as an output binding payload to the target.
@@ -36,7 +36,7 @@ An Azure Functions app implemented as a custom handler must configure the *host.
3636

3737
## Application structure
3838

39-
To implement a custom handler, you need the following aspects in your application:
39+
To implement a custom handler, you need the following aspects to your application:
4040

4141
- A *host.json* file at the root of your app
4242
- A *function.json* file for each function (inside a folder that matches the function name)
@@ -118,7 +118,7 @@ The request payload for pure HTTP functions is the raw HTTP request payload. Pur
118118

119119
Any other type of function that includes either input, output bindings or is triggered via an event source other than HTTP have a custom request payload.
120120

121-
The following code represents a sample request payload. The payload includes a JSON payload with two members: `Data` and `Metadata`.
121+
The following code represents a sample request payload. The payload includes a JSON structure with two members: `Data` and `Metadata`.
122122

123123
The `Data` member includes keys that match input and trigger names as defined in the bindings array in the *function.json* file.
124124

@@ -174,13 +174,13 @@ A request payload similar to this example is returned:
174174

175175
By convention, function responses are formatted as key/value pairs. Supported keys include:
176176

177-
| Payload key | Data type | Remarks |
177+
| <nobr>Payload key</nobr> | Data type | Remarks |
178178
| ------------- | --------- | ------------------------------------------------------------ |
179179
| `Outputs` | JSON | Holds response values as defined by the `bindings` array the *function.json* file.<br /><br />For instance, if a function is configured with a blob storage output binding named "blob", then `Outputs` contains a key named `blob`, which is set to the blob's value. |
180-
| `Logs` | array | Messages appear in the Functions invocation logs.<br /><br />When running in Azure, logged messaged appear in Application Insights. |
180+
| `Logs` | array | Messages appear in the Functions invocation logs.<br /><br />When running in Azure, messages appear in Application Insights. |
181181
| `ReturnValue` | string | Used to provide a response when an output is configured as `$return` in the *function.json* file. |
182182

183-
See the [example for a sample payload](#server-implementation).
183+
See the [example for a sample payload](#bindings-implementation).
184184

185185
## Examples
186186

@@ -204,6 +204,8 @@ content-type: application/json
204204
}
205205
```
206206

207+
<a id="hello-implementation" name="hello-implementation"></a>
208+
207209
### Implementation
208210

209211
In a folder named *http*, the *function.json* file configures the HTTP-triggered function.
@@ -278,7 +280,7 @@ The route for the order function here is `/hello` and not `/api/hello` because t
278280
279281
## Function with bindings
280282

281-
The scenario implemented in this example features a function named `order` that accepts a `POST` with a payload representing a product order.
283+
The scenario implemented in this example features a function named `order` that accepts a `POST` with a payload representing a product order. As an order is posted to the function, a Queue Storage message is created and an HTTP response is returned.
282284

283285
```http
284286
POST http://127.0.0.1:7071/api/order HTTP/1.1
@@ -291,6 +293,8 @@ content-type: application/json
291293
}
292294
```
293295

296+
<a id="bindings-implementation" name="bindings-implementation"></a>
297+
294298
### Implementation
295299

296300
In a folder named *order*, the *function.json* file configures the HTTP-triggered function.
@@ -436,7 +440,7 @@ This example is for Node.js, so you may have to alter this example for other lan
436440

437441
## Deploying
438442

439-
A custom handler can be deployed to any Azure Functions hosting option. If your handler requires custom dependencies (such as a language runtime), you may need to use a [custom container](./functions-create-function-linux-custom-image.md).
443+
A custom handler can be deployed to nearly every Azure Functions hosting option (see [restrictions](#restrictions)). If your handler requires custom dependencies (such as a language runtime), you may need to use a [custom container](./functions-create-function-linux-custom-image.md).
440444

441445
## Restrictions
442446

0 commit comments

Comments
 (0)