proxy-wasm / proxy-wasm-rust-sdk

WebAssembly for Proxies (Rust SDK)
Apache License 2.0
490 stars 97 forks source link

http client choice #230

Open GOVYANSONG opened 6 months ago

GOVYANSONG commented 6 months ago

Hi team,

I am trying to understand how to best make http client call from inside wasm filter of envoy proxy. instead of dispatch_http_call, can I use reqwest-wasm instead because reqwest-wasm apparently supports wasm build target?

Thanks,

antonengelhardt commented 6 months ago

AFAIK, you can only make http calls using the built in proxy Wasm sdk methods, because the plugin is embedded into the envoy proxy and can only talk to the upstream clusters.

But I haven't tried it with reqwest-Wasm yet, so it'd be interesting to know if it works.

foo4u commented 5 months ago

@GOVYANSONG you should use dispatch_http_call to let Envoy handle the request.

pi-pi-miao commented 2 months ago

只能使用dispatch_http_call

pi-pi-miao commented 2 months ago

如果不想使用dispatch_http_call,那么使用dispatch_grpc_call或许是一个更好的选择

pi-pi-miao commented 2 months ago

@GOVYANSONG 使用 grpc调用可以参考 #254