[英]Does HTTP stub server stubby4j support request proxying with additional query params setting?
TL;DR :特尔;博士:
Does stubby4j request proxying functionality support the setting of additional query params with the request which is being proxied? stubby4j 请求代理功能是否支持使用被代理的请求设置附加查询参数?
Details :详情:
I am using stubby4j HTTP stub server, the latest version (ie: v7.3.3
) to proxy requests to another real live service when my request did not match any of the configured stubs.当我的请求与任何配置的存根不匹配时,我正在使用 stubby4j HTTP 存根服务器,最新版本(即: v7.3.3
)将请求代理到另一个真实的实时服务。
I am interested to know if it is possible to pass in additional query params to the live service with the request which is being proxied?我很想知道是否可以将额外的查询参数传递给正在代理的请求的实时服务?
In the official docs of the stubby4j request proxying behavior ( https://stubby4j.com/docs/REQUEST_PROXYING.html ) there is nothing mentioned about it and from what I see in my own testing, I do not think this is supported.在stubby4j请求代理行为的官方文档 ( https://stubby4j.com/docs/REQUEST_PROXYING.html ) 中没有提及它,从我在自己的测试中看到的情况来看,我认为这不受支持。 But, I still wanted to ask on SO to check if I am simply doing something wrong.但是,我仍然想问 SO 检查我是否只是做错了什么。
You are correct, the the setting of additional query params on the request being proxied is not supported currently.您是对的,当前不支持在被代理的请求上设置附加查询参数。
As per the aforementioned docs, the additive
strategy only supports the setting of additional HTTP headers, which are specified in the headers
property on the proxy-config
object in your YAML.根据上述文档, additive
策略仅支持设置额外的 HTTP 标头,这些headers
在 YAML 中proxy-config
对象的headers
属性中指定。
But, it is pretty straightforward to add the addition of query params behavior.但是,添加查询参数行为非常简单。 Feel free to raise a feature request at https://github.com/azagniotov/stubby4j/issues/new/choose请随时在https://github.com/azagniotov/stubby4j/issues/new/choose提出功能请求
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.