I need to open an external link, and send some params through post method. I have read that I can use redirect() to open a link through get method, as the following code:
def get = {
redirect(url: "http://localhost:8080/test/public/cadastro/dataConfirm.html?" + "username=" + "test")
}
Apparently, redirect only works with get. Is there any command to do this by post method? Thanks.
Server-to-server comunication via post in grails can be achieved using the following java code
. I tested it and works fine in grails. The alternatives are plugins, as @Kelly answered me, and
Apache Http Components
.