[英]WSO2 API Manager 1.9.1 - Routing
WSO2 API Manger中有什么方法可以从请求xml / json(有效负载)中读取参数值,并基于该值将请求路由到其他后端端点?
You can try using mediator extensions. 您可以尝试使用中介程序扩展。
The API Manager has a default mediation flow for the API invocation requests that it receives. API管理器具有针对其接收的API调用请求的默认中介流。 You can extend this default mediation flow to route the request.
您可以扩展此默认中介流以路由请求。
<sequence xmlns="http://ws.apache.org/ns/synapse" name="YahooWeather2"> <property name="YQL" type="Expression" expression="concat('?q=select%20*%20from%20weather.forecast%20where%20woeid%20in%20(select%20woeid%20from%20geo.places(1)%20where%20text%3D%22',syn:get-property('uri.var.zipcode'),',',syn:get-property('uri.var.country'),'%22)format=json')"/> <property name="REST_URL_POSTFIX" type="Expression" expression="get-property('YQL')" scope="Axis2"/> </sequence>
You can check availability from API Console in API store. 您可以从API存储区中的API控制台检查可用性。 for ferther details refer https://docs.wso2.com/display/AM191/Change+the+Default+Mediation+Flow+of+API+Requests
有关更多详细信息,请参阅https://docs.wso2.com/display/AM191/Change+the+Default+Mediation+Flow+of+API+Requests
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.