Hi
I would try this as your right the variable that you referenced within your post doesn't always work. You can always try the following to pull the DNS name out. I used the following request URL:
http://test.api.ca.com:8080/group?test=CA&group=CAAPIM
I have 2 assertions within my policy:
- Evaluate Regular expression
- Return Template Response
Regex assertion looks like this:
Regular Expression field = //([^/?:]*)
Source = request.url
Destination section:
- Button selected for "Proceed if Pattern Matches"
- Context Variable = test
Return Template response is:
test:
URL = ${request.url}
URI = ${request.http.uri}
Parameter:
test=${request.http.parameter.test}
group=${request.http.parameter.group}
Regular expression:
test =${test[1]}
Variable test is what the result of the "Evaluate Regular Expression" assertion.
When I ran this test I received the following:
===================================
test: URL = http://test.api.ca.com:8080/group?test=CA&group=CAAPIM URI = /group Parameter: test=CA group=CAAPIM Regular expression: test =test.api.ca.com
======================================
As well to take note here is how you can call back parameters within the URL.
request.http.parameter.*
*= name of parameter.
Hope this helps?
Regards