Skip to content

Commit

Permalink
Merge pull request #1968 from vdice/chore/rm-comments-self-outbound
Browse files Browse the repository at this point in the history
chore(examples): rm comments re: outbound/self http
  • Loading branch information
itowlson authored Oct 26, 2023
2 parents 216752d + 34d2192 commit 3950166
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ async fn send_outbound(_req: Request) -> Result<impl IntoResponse> {
let mut res: http::Response<()> = spin_sdk::http::send(
http::Request::builder()
.method("GET")
.uri("/hello") // relative routes are not yet supported in cloud
.uri("/hello")
.body(())?,
)
.await?;
Expand Down
1 change: 0 additions & 1 deletion examples/http-rust-outbound-http/spin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ command = "cargo build --target wasm32-wasi --release"
id = "outbound-http-to-same-app"
source = "outbound-http-to-same-app/target/wasm32-wasi/release/outbound_http_to_same_app.wasm"
# To make outbound calls to components in the same Spin app, use the special value self.
# This is not yet supported in cloud.
allowed_http_hosts = ["self"]
[component.trigger]
route = "/outbound-to-hello-component"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ func init() {
spinhttp.Handle(func(w http.ResponseWriter, r *http.Request) {
// Because we included self in `allowed_http_hosts`, we can make outbound
// HTTP requests to our own app using a relative path.
// This is not yet supported in cloud.
resp, err := spinhttp.Get("/hello")
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
Expand Down
1 change: 0 additions & 1 deletion examples/http-tinygo-outbound-http/spin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ command = "tinygo build -target=wasi -gc=leaking -no-debug -o main.wasm main.go"
id = "outbound-http-to-same-app"
source = "outbound-http-to-same-app/main.wasm"
# Use self to make outbound requests to components in the same Spin application.
# `self` is not yet supported in cloud
allowed_http_hosts = ["self"]
[component.trigger]
route = "/outbound-http-to-same-app"
Expand Down

0 comments on commit 3950166

Please sign in to comment.