If my incoming URL is this....
http://data-api:8080/policies/400?output=json
...what method on the request object in Grails will give me this...
/policies/400?output=json
I know request.forwardURI
gives everything up to ?, but does not include the parameters
request.requestURI + '?' + request.queryString
I found the difference of request.requestURI
between in Jetty and in WebLogic 10.2.
So, I use helper class :
def helper = new org.springframework.web.util.UrlPathHelper()
def reqURI = helper.getOriginatingRequestUri(request)
def qryStr = helper.getOriginatingQueryString(request)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With