...
The prefix used to get the URI element of a request URL.
Example of $url usage:
Create a REST API with the following configuration using instructions given in page Creating APIs.
Code Block language xml <api xmlns="http://ws.apache.org/ns/synapse" name="Editing" context="/editing"> <resource methods="GET" uri-template="/edit?a={symbol}&b={value}"> <inSequence> <log level="full"> <property name="SYMBOL" expression="$url:a"></property> <property name="VALUE" expression="$url:b"></property> </log> <respond></respond> </inSequence> </resource> </api>
Send a request to the REST API you created using a browser as follows:
Code Block language xml http://10.100.5.73:8280/editing/edit?a=wso2&b=2.4
You would You will see the following in the ESB log:
Code Block language xml LogMediator To: /editing/edit?a=wso2&b=2.4, MessageID: urn:uuid:36cb5ad7-f150-490d-897a-ee7b86a9307d, Direction: request, SYMBOL = wso2, VALUE = 2.4, Envelope: <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body></soapenv:Body></soapenv:Envelope>
...