Skip to content

Commit

Permalink
Merge pull request #2086 from dicej/fix-2080-v2.0
Browse files Browse the repository at this point in the history
[Backport v2.0] fix non-streaming outgoing POST requests in Rust SDK
  • Loading branch information
lann authored Nov 10, 2023
2 parents fb03aad + dc43b24 commit 77de790
Show file tree
Hide file tree
Showing 15 changed files with 886 additions and 11 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ hyper = { workspace = true }
sha2 = "0.10.1"
which = "4.2.5"
e2e-testing = { path = "crates/e2e-testing" }
http-body-util = { workspace = true }

[build-dependencies]
cargo-target-dep = { git = "https://github.com/fermyon/cargo-target-dep", rev = "b7b1989fe0984c0f7c4966398304c6538e52fe49" }
Expand Down
2 changes: 2 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const RUST_HTTP_VAULT_VARIABLES_TEST: &str = "tests/http/vault-variables-test";
const RUST_OUTBOUND_REDIS_INTEGRATION_TEST: &str = "tests/outbound-redis/http-rust-outbound-redis";
const TIMER_TRIGGER_INTEGRATION_TEST: &str = "examples/spin-timer/app-example";
const WASI_HTTP_INTEGRATION_TEST: &str = "examples/wasi-http-rust-streaming-outgoing-body";
const OUTBOUND_HTTP_POST_INTEGRATION_TEST: &str = "examples/http-rust-outbound-post";

fn main() {
// Extract environment information to be passed to plugins.
Expand Down Expand Up @@ -92,6 +93,7 @@ error: the `wasm32-wasi` target is not installed
cargo_build(RUST_OUTBOUND_REDIS_INTEGRATION_TEST);
cargo_build(TIMER_TRIGGER_INTEGRATION_TEST);
cargo_build(WASI_HTTP_INTEGRATION_TEST);
cargo_build(OUTBOUND_HTTP_POST_INTEGRATION_TEST);
}

fn build_wasm_test_program(name: &'static str, root: &'static str) {
Expand Down
2 changes: 2 additions & 0 deletions examples/http-rust-outbound-post/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[build]
target = "wasm32-wasi"
Loading

0 comments on commit 77de790

Please sign in to comment.