Update wasm.md to include some HTTP instructions (#3649)

* Update wasm.md to include some HTTP instructions

Signed-off-by: Brendan Burns <bburns@microsoft.com>

* Update daprdocs/content/en/reference/components-reference/supported-bindings/wasm.md

Co-authored-by: Mark Fussell <markfussell@gmail.com>
Signed-off-by: Brendan Burns <bburns@microsoft.com>

* Update daprdocs/content/en/reference/components-reference/supported-bindings/wasm.md

Co-authored-by: Mark Fussell <markfussell@gmail.com>
Signed-off-by: Brendan Burns <bburns@microsoft.com>

* Update daprdocs/content/en/reference/components-reference/supported-bindings/wasm.md

Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com>
Signed-off-by: Brendan Burns <bburns@microsoft.com>

* Update daprdocs/content/en/reference/components-reference/supported-bindings/wasm.md

Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com>
Signed-off-by: Brendan Burns <bburns@microsoft.com>

---------

Signed-off-by: Brendan Burns <bburns@microsoft.com>
Co-authored-by: Mark Fussell <markfussell@gmail.com>
Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com>
This commit is contained in:
Brendan Burns 2023-08-04 12:08:12 -07:00 committed by GitHub
parent 4d444bd12a
commit dd6730849d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -41,6 +41,17 @@ Dapr uses [wazero](https://wazero.io) to run these binaries, because it has no
dependencies. This allows use of WebAssembly with no installation process
except Dapr itself.
The Wasm output binding supports making HTTP client calls using the [wasi-http](https://github.com/WebAssembly/wasi-http) specification.
You can find example code for making HTTP calls in a variety of languages here:
* [Golang](https://github.com/dev-wasm/dev-wasm-go/tree/main/http)
* [C](https://github.com/dev-wasm/dev-wasm-c/tree/main/http)
* [.NET](https://github.com/dev-wasm/dev-wasm-dotnet/tree/main/http)
* [TypeScript](https://github.com/dev-wasm/dev-wasm-ts/tree/main/http)
{{% alert title="Note" color="primary" %}}
If you just want to make an HTTP call, it is simpler to use the [service invocation API]({{< ref howto-invoke-non-dapr-endpoints.md >}}). However, if you need to add your own logic - for example, filtering or calling to multiple API endpoints - consider using Wasm.
{{% /alert %}}
## Component format
To configure a Wasm binding, create a component of type