proxy-wasm-rust-sdk icon indicating copy to clipboard operation
proxy-wasm-rust-sdk copied to clipboard

http client choice

Open GOVYANSONG opened this issue 9 months ago • 5 comments

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,

GOVYANSONG avatar Apr 27 '24 19:04 GOVYANSONG

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.

antonengelhardt avatar Apr 28 '24 12:04 antonengelhardt

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

foo4u avatar May 23 '24 18:05 foo4u

只能使用dispatch_http_call

pi-pi-miao avatar Aug 15 '24 06:08 pi-pi-miao

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

pi-pi-miao avatar Aug 15 '24 06:08 pi-pi-miao

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

pi-pi-miao avatar Aug 16 '24 08:08 pi-pi-miao