mirror of
https://github.com/katanemo/plano.git
synced 2026-05-08 15:22:43 +02:00
Encode parameter values in http path and ... (#395)
* Encode parameter values in http path and ... - don't send param values in request body in http get request - send param values in http post request * rust tests * refactor code * add tests
This commit is contained in:
parent
a62f906432
commit
e82f8f216f
7 changed files with 643 additions and 74 deletions
|
|
@ -365,6 +365,7 @@ fn prompt_gateway_request_to_llm_gateway() {
|
|||
metadata: None,
|
||||
};
|
||||
|
||||
let expected_body = "{\"city\":\"seattle\"}";
|
||||
let arch_fc_resp_str = serde_json::to_string(&arch_fc_resp).unwrap();
|
||||
module
|
||||
.call_proxy_on_http_call_response(http_context, 1, 0, arch_fc_resp_str.len() as i32, 0)
|
||||
|
|
@ -377,18 +378,17 @@ fn prompt_gateway_request_to_llm_gateway() {
|
|||
.expect_log(Some(LogLevel::Debug), None)
|
||||
.expect_log(Some(LogLevel::Trace), None)
|
||||
.expect_log(Some(LogLevel::Trace), None)
|
||||
.expect_log(Some(LogLevel::Trace), None)
|
||||
.expect_http_call(
|
||||
Some("arch_internal"),
|
||||
Some(vec![
|
||||
("x-arch-upstream", "api_server"),
|
||||
(":method", "POST"),
|
||||
(":path", "/weather"),
|
||||
(":authority", "api_server"),
|
||||
("content-type", "application/json"),
|
||||
("x-arch-upstream", "api_server"),
|
||||
(":authority", "api_server"),
|
||||
("x-envoy-max-retries", "3"),
|
||||
(":path", "/weather"),
|
||||
]),
|
||||
None,
|
||||
Some(expected_body),
|
||||
None,
|
||||
None,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue