简体   繁体   English

HTTP 存根服务器 stubby4j 是否支持具有附加查询参数设置的请求代理?

[英]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.

相关问题 SpringBoot嵌入式服务器是否完全支持java EE? - does SpringBoot embedded server Fully support java EE? 云配置出现请求执行错误。 endpoint=DefaultEndpoint{ serviceUrl='http://localhost:8761/} 来自 Eureka 服务器 - Cloud config got Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://localhost:8761/} from Eureka server Kong是否支持API聚合 - Does Kong support API Aggregation AppDynamics是否记录请求和响应 - Does AppDynamics log request and response 根据请求正文中的数据转发HTTP请求 - Forward http requests based on data from the request body 分子传输器与 http 请求调用有何不同? - How are Moleculer transporters are different from http request calls? 是否可以使用 ASP.net 调用同步 http 发布请求? - Is it possible to call synchronous http post request using ASP.net? 我应该在rest api中使用GET或POST或PUT来获取基于少数输入参数的输出,这些输入参数将被接受为请求正文的一部分 - Should I use GET or POST or PUT in rest api to get output based on few input params which are to be accepted as part of request body 异步HTTP请求与新线程上的HTTP请求 - Async HTTP request vs HTTP requests on new thread 同步到异步 http 请求和响应架构 - Sync to Async http request and response architecture
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM