in lambda-runtime-api-client/src/lib.rs [155:179]
fn test_set_origin_with_base_path() {
let base = "http://localhost:9001/foo";
let client = Client::builder().with_endpoint(base.parse().unwrap()).build().unwrap();
let req = build_request()
.uri("/2018-06-01/runtime/invocation/next")
.body(())
.unwrap();
let req = client.set_origin(req).unwrap();
assert_eq!(
"http://localhost:9001/foo/2018-06-01/runtime/invocation/next",
&req.uri().to_string()
);
let base = "http://localhost:9001/foo/";
let client = Client::builder().with_endpoint(base.parse().unwrap()).build().unwrap();
let req = build_request()
.uri("/2018-06-01/runtime/invocation/next")
.body(())
.unwrap();
let req = client.set_origin(req).unwrap();
assert_eq!(
"http://localhost:9001/foo/2018-06-01/runtime/invocation/next",
&req.uri().to_string()
);
}