You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use case for this is custom Auth policy for Envoy often needs to make additional validation HTTP requests to IDP services as example to validate header values or possibly chain 2 calls to get final OK to Continue.
Looking at on_http_request_headers function and Rust HTTP Client calls it seem those are not compatible even if we use reqwest::blocking::Client. Is this something that can be done in the context of WASM custom policy for Envoy or NOT?
Using this sample code inside a function while it works in Rust code it does not seem to be compatible with proxi-wasm ABI
let client = Client::new();
let resp = client.post("http://httpbin.org/post")
.body("Send secret code to validate")
.send()?;
if resp.status() == StatusCode::OK {
println!("RESULT 200");
return Action::Continue;
}else{
println!("RESULT ERROR");
}
This code cannot compile due to errors like this one of them cannot use the ? operator in a method that returns proxy_wasm::types::Action
The text was updated successfully, but these errors were encountered:
Use case for this is custom Auth policy for Envoy often needs to make additional validation HTTP requests to IDP services as example to validate header values or possibly chain 2 calls to get final OK to Continue.
Looking at on_http_request_headers function and Rust HTTP Client calls it seem those are not compatible even if we use reqwest::blocking::Client. Is this something that can be done in the context of WASM custom policy for Envoy or NOT?
Using this sample code inside a function while it works in Rust code it does not seem to be compatible with proxi-wasm ABI
let client = Client::new();
let resp = client.post("http://httpbin.org/post")
.body("Send secret code to validate")
.send()?;
if resp.status() == StatusCode::OK {
println!("RESULT 200");
return Action::Continue;
}else{
println!("RESULT ERROR");
}
This code cannot compile due to errors like this one of them cannot use the
?
operator in a method that returnsproxy_wasm::types::Action
The text was updated successfully, but these errors were encountered: