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. 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. for ferther details refer https://docs.wso2.com/display/AM191/Change+the+Default+Mediation+Flow+of+API+Requests
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.