0
RESTfulなマッピングをRESTfulにしようとしています。私のエンドポイントはhttp://samples.openweathermap.org/data/2.5/weather?q=London,uk
WSO2 ESB - リソースのプロパティをIn SequenceのURLパラメータとして使用する方法
であると私は
<api name="API_1" context="get_weather" hostname="http://localhost" port="8080">
<resource method="GET" uri-template="/{p1}/{p2}/">
<inSequence>
<log level="custom">
<property name="param1" expression="get-property('uri.var.p1')" />
<property name="param2" expression="get-property('uri.var.p2')" />
</log>
<send>
<endpoint key="http://samples.openweathermap.org/data/2.5/weather?q{param2},{param1}" />
</send>
</inSequence>
</resource>
</api>
最終的に私は要求
を作るためにcurl
に使用しますが、これは、リソースの私のソースビューで
http://localhost:8080/get_weather/uk/London
にマッピングよ
curl -i -H "Accept: application/json" -X GET http://localhost:8080/get_weather/uk/London
endpoint
にログに記録されたパラメータを使用するにはどうすればよいですか?