praveen2609
praveen2609

Reputation: 233

how to make an external url call in grails

I want to request a payment gateway url from grails app using jquery ajax or on server side in grails app but was not able to request the url from the grails app using jquery ajax request as the request does not get proceed because of the securityfilters.groovy.

Is their any way to filter that particular url in securityFilters.groovy or any way I can request the external url from server side and get the response?

Upvotes: 2

Views: 1605

Answers (1)

allthenutsandbolts
allthenutsandbolts

Reputation: 1523

I think you are running in to Xss issues with making a AJAX call to a different domain. You can instead call a server side action in your application which can call the URL with the necessary parameters. You can use HTTPBuilder library to make calls.

Upvotes: 1

Related Questions