是否可以为具有自己的查询字符串的请求指定服务结构反向代理

Is it possible to specify Service fabric reverse proxy for a request having its own query string

我们可以使用服务架构反向代理并指定 "PartitionKey" 作为查询字符串。那么,使用反向代理和 "PartitionKey" 查询字符串,是否可以在我的 API 请求中指定不同的查询字符串?

我的 API 将如下所示:

[HttpGet]
[Route("{someId:Guid}/myapimethod")]
public async Task<IHttpActionResult> MyApiMethod(Guid someId, string queryForApiPurpose){ ………..}

在没有反向代理的情况下对上述API的调用就像

http://clusteraddress/api/d281be34-c3f8-414a-9484-2e8f40607dab/myapimethod?queryForApiPurpose=avalue

当我也有一个 "PartitionKey" 时,通过反向代理对上面 API 的调用是什么?我猜我们无法在请求中使用查询字符串。

是的,您可以通过反向代理向请求添加查询字符串参数,它们将被转发到目标服务。