| author | ggailey777 |
|---|---|
| ms.service | azure-functions |
| ms.topic | include |
| ms.date | 02/26/2026 |
| ms.author | glenga |
The following example shows the function definition after adding a Queue Storage output binding to an HTTP triggered function:
::: zone pivot="programming-language-csharp"
Because an HTTP triggered function also returns an HTTP response, the function returns a MultiResponse object, which represents both the HTTP and queue output.
[Function("HttpExample")]
public MultiResponse Run([HttpTrigger(AuthorizationLevel.Function, "get", "post")] HttpRequest req)
{This example is the definition of the MultiResponse object that includes the output binding:
public class MultiResponse
{
[QueueOutput("outqueue",Connection = "AzureWebJobsStorage")]
public string[] Messages { get; set; }
public IActionResult HttpResponse { get; set; }
}This example uses ASP.NET Core integration. If you aren't using ASP.NET Core integration, you need to change HttpRequest to HttpRequestData and IActionResult to HttpResponseData.
:::code language="csharp" source="~/functions-docs-csharp/functions-add-output-binding-storage-queue-cli/HttpExample.cs" range="14-18" highlight="4":::
Messages are sent to the queue when the function completes. The way you define the output binding depends on your process model. For more information, including links to example binding code that you can refer to, see Add bindings to a function.
::: zone-end
::: zone pivot="programming-language-java"
:::code language="java" source="~/functions-quickstart-java/functions-add-output-binding-storage-queue/src/main/java/com/function/Function.java" range="16-22" highlight="5-6":::
For more information, including links to example binding code that you can refer to, see Add bindings to a function.
::: zone-end
::: zone pivot="programming-language-javascript"
:::code language="javascript" source="~/functions-docs-javascript/functions-add-output-binding-storage-queue-cli-v4-programming-model/src/functions/httpTrigger1.js":::
:::code language="json" source="~/functions-docs-javascript/functions-add-output-binding-storage-queue-cli/HttpExample/function.json" highlight="18-24" :::
The way you define the output binding depends on the version of your Node.js model. For more information, including links to example binding code that you can refer to, see Add bindings to a function.
::: zone-end
::: zone pivot="programming-language-powershell"
:::code language="powershell" range="18-19" source="~/functions-docs-powershell/functions-add-output-binding-storage-queue-cli/HttpExample/run.ps1" highlight="18-24":::
For more information, including links to example binding code that you can refer to, see Add bindings to a function.
::: zone-end
::: zone pivot="programming-language-python"
:::code language="python" source="~/functions-docs-python-v2/function_app.py" range="6-9" highlight="2":::
:::code language="json" source="~/functions-docs-javascript/functions-add-output-binding-storage-queue-cli/HttpExample/function.json" highlight="18-24":::
The way you define the output binding depends on the version of your Python model. For more information, including links to example binding code that you can refer to, see Add bindings to a function.
::: zone-end
::: zone pivot="programming-language-typescript"
:::code language="typescript" source="~/functions-docs-javascript/functions-add-output-binding-storage-queue-cli-v4-programming-model-ts/src/functions/httpTrigger1.ts":::
:::code language="json" source="~/functions-docs-javascript/functions-add-output-binding-storage-queue-cli/HttpExample/function.json" highlight="18-24":::
The way you define the output binding depends on the version of your Node.js model. For more information, including links to example binding code that you can refer to, see Add bindings to a function. ::: zone-end