Skip to content

Commit 301bf90

Browse files
authored
Merge branch 'MicrosoftDocs:main' into high-availability
2 parents 30257df + e7ef417 commit 301bf90

86 files changed

Lines changed: 584 additions & 691 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

articles/azure-functions/TOC.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
href: functions-scale.md
2020
- name: Quickstarts
2121
displayName: quickstart, get started
22+
expanded: true
2223
items:
2324
- name: Scenarios
2425
expanded: true
@@ -52,12 +53,13 @@
5253
- name: Developer tools
5354
items:
5455
- name: Azure Developer CLI
55-
displayName: Flex Consumption plan
56+
displayName: azd
5657
href: create-first-function-azure-developer-cli.md
57-
- name: Command line
58-
displayName: quickstart, get started
58+
- name: Command line (Core Tools)
59+
displayName: quickstart, get started, go, rust
5960
href: how-to-create-function-azure-cli.md
6061
- name: Visual Studio Code
62+
displayName: quickstart, get started, go, rust
6163
href: how-to-create-function-vs-code.md
6264
- name: Visual Studio
6365
href: functions-create-your-first-function-visual-studio.md
@@ -84,8 +86,6 @@
8486
- name: Terraform
8587
displayName: Terraform, quickstart, get started
8688
href: functions-create-first-function-terraform.md
87-
- name: Custom handlers (Go/Rust)
88-
href: create-first-function-vs-code-other.md
8989
- name: Connect to services
9090
items:
9191
- name: Storage

articles/azure-functions/create-first-function-azure-developer-cli.md

Lines changed: 31 additions & 95 deletions
Large diffs are not rendered by default.

articles/azure-functions/create-first-function-vs-code-other.md

Lines changed: 0 additions & 350 deletions
This file was deleted.

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

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ An Azure Functions app implemented as a custom handler must configure the *host.
4141

4242
## Deploy self-hosted MCP servers
4343

44-
Custom handlers also enables you to host MCP servers that you build using official MCP SDKs in Azure Functions. Custom handlers provides a simple and streamlined experience for hosting your MCP servers in Azure. For more information, see [Self-hosted remote MCP server on Azure Functions](./self-hosted-mcp-servers.md).
44+
Custom handlers also enables you to host MCP servers that you build by using official MCP SDKs in Azure Functions. Custom handlers provides a simple and streamlined experience for hosting your MCP servers in Azure. For more information, see [Self-hosted remote MCP server on Azure Functions](./self-hosted-mcp-servers.md).
4545

4646
[!INCLUDE [functions-custom-handler-mcp-preview](../../includes/functions-custom-handler-mcp-preview.md)]
4747

4848
## Application structure
4949

50-
To implement a custom handler, you need the following aspects in your application:
50+
To implement a custom handler, your application needs the following aspects:
5151

5252
- A *host.json* file at the root of your app
5353
- A *local.settings.json* file at the root of your app
@@ -193,8 +193,8 @@ By convention, function responses are formatted as key/value pairs. Supported ke
193193

194194
| <nobr>Payload key</nobr> | Data type | Remarks |
195195
| ------------- | --------- | ------------------------------------------------------------ |
196-
| `Outputs` | object | Holds response values as defined by the `bindings` array in *function.json*.<br /><br />For instance, if a function is configured with a queue output binding named "myQueueOutput", then `Outputs` contains a key named `myQueueOutput`, which the custom handler sets to the messages that are sent to the queue. |
197-
| `Logs` | array | Messages appear in the Functions invocation logs.<br /><br />When running in Azure, messages appear in Application Insights. |
196+
| `Outputs` | object | Holds response values as defined by the `bindings` array in *function.json*.<br /><br />For instance, if a function is configured with a queue output binding named "myQueueOutput", then `Outputs` contains a key named `myQueueOutput`, which the custom handler sets to the messages that it sends to the queue. |
197+
| `Logs` | array | Messages that appear in the Functions invocation logs.<br /><br />When running in Azure, messages appear in Application Insights. |
198198
| `ReturnValue` | string | Used to provide a response when an output is configured as `$return` in the *function.json* file. |
199199

200200
This table shows an example of a response payload.
@@ -406,10 +406,10 @@ By setting the `message` output equal to the order data that came in from the re
406406

407407
### HTTP-only function
408408

409-
For HTTP-triggered functions with no additional bindings or outputs, you might want your handler to work directly with the HTTP request and response instead of the custom handler [request](#request-payload) and [response](#response-payload) payloads. You can configure this behavior in *host.json* by using the `enableForwardingHttpRequest` setting.
409+
For HTTP-triggered functions with no additional bindings or outputs, you might want your handler to work directly with the HTTP request and response instead of the custom handler [request](#request-payload) and [response](#response-payload) payloads. You can configure this behavior in *host.json* by using the `enableProxyingHttpRequest` setting, which supports response streaming.
410410

411411
> [!IMPORTANT]
412-
> The primary purpose of the custom handlers feature is to enable languages and runtimes that don't currently have first-class support on Azure Functions. While you might be able to run web applications by using custom handlers, Azure Functions isn't a standard reverse proxy. Some features such as response streaming, HTTP/2, and WebSockets aren't available. Some components of the HTTP request such as certain headers and routes might be restricted. Your application might also experience excessive [cold start](event-driven-scaling.md#cold-start).
412+
> The primary purpose of the custom handlers feature is to enable languages and runtimes that don't currently have first-class support on Azure Functions. While you might be able to run web applications by using custom handlers, Azure Functions isn't a standard reverse proxy. Some components of the HTTP request, such as certain headers and routes, might be restricted. Your application might also experience excessive [cold start](event-driven-scaling.md#cold-start).
413413
>
414414
> To address these circumstances, consider running your web apps on [Azure App Service](../app-service/overview.md).
415415
@@ -444,7 +444,7 @@ In a folder named *hello*, the *function.json* file configures the HTTP-triggere
444444

445445
The function is configured to accept both `GET` and `POST` requests, and the result value is provided through an argument named `res`.
446446

447-
At the root of the app, the *host.json* file is configured to run `handler.exe` and `enableForwardingHttpRequest` is set to `true`.
447+
At the root of the app, the *host.json* file is configured to run `handler.exe` and `enableProxyingHttpRequest` is set to `true`.
448448

449449
```json
450450
{
@@ -453,18 +453,13 @@ At the root of the app, the *host.json* file is configured to run `handler.exe`
453453
"description": {
454454
"defaultExecutablePath": "handler.exe"
455455
},
456-
"enableForwardingHttpRequest": true
456+
"enableProxyingHttpRequest": true
457457
}
458458
}
459459
```
460460

461-
When you set `enableForwardingHttpRequest` to `true`, the behavior of HTTP-only functions differs from the default custom handlers behavior in these ways:
461+
The following is a POST request to the Functions host. The Functions host then sends the request to the custom handler.
462462

463-
* The HTTP request doesn't contain the custom handlers [request](#request-payload) payload. Instead, the Functions host invokes the handler with a copy of the original HTTP request.
464-
* The Functions host invokes the handler with the same path as the original request, including any query string parameters.
465-
* The Functions host returns a copy of the handler's HTTP response as the response to the original request.
466-
467-
The following example is a POST request to the Functions host. The Functions host then sends a copy of the request to the custom handler at the same path.
468463

469464
```http
470465
POST http://127.0.0.1:7071/api/hello HTTP/1.1

0 commit comments

Comments
 (0)