spin_manifest_version = 2
[application]
authors = ["The Spin authors"]
description = "Demonstrates outbound HTTP calls"
name = "outbound-http"
version = "1.0.0"
[[trigger.http]]
route = "/outbound"
component = "outbound-http"
[[trigger.http]]
route = "/wildcard"
component = "outbound-http-wildcard"
[[trigger.http]]
route = "/outbound-to-hello-component"
component = "outbound-http-to-same-app"
[[trigger.http]]
route = "/hello"
component = "hello-component"
[component.outbound-http]
source = "../../target/wasm32-wasip1/release/http_rust_outbound_http.wasm"
allowed_outbound_hosts = [
"https://random-data-api.fermyon.app",
"http://foo.com",
"https://foo.com",
]
[component.outbound-http.build]
workdir = "outbound-http"
command = "cargo build --target wasm32-wasip1 --release"
[component.outbound-http-wildcard]
source = "../../target/wasm32-wasip1/release/http_rust_outbound_http.wasm"
allowed_outbound_hosts = ["https://*:*"]
[component.outbound-http-wildcard.build]
workdir = "outbound-http"
command = "cargo build --target wasm32-wasip1 --release"
[component.outbound-http-to-same-app]
source = "../../target/wasm32-wasip1/release/outbound_http_to_same_app.wasm"
allowed_outbound_hosts = ["http://self"]
[component.outbound-http-to-same-app.build]
workdir = "outbound-http-to-same-app"
command = "cargo build --target wasm32-wasip1 --release"
[component.hello-component]
source = "../../target/wasm32-wasip1/release/http_hello.wasm"
description = "A simple component that returns hello."
[component.hello-component.build]
workdir = "http-hello"
command = "cargo build --target wasm32-wasip1 --release"