0

I have requirement of changing GET to POST redirection to external URL.

Currently, we are using checkFormRedirect(url,req,res) to redirect to external URL which by default uses GET as per my understanding. I want to change this request to POST.

One way is we can use HTTPClient API for re-direction.

Is there any way ATG out of box provide some thing to POST redirection. Please help.

Manan Kapoor
  • 675
  • 1
  • 11
  • 28

1 Answers1

0

If you submitted a form in JSP as you are using checkFormRedirect(). It is already a POST request and you can get data in your handlerXXX method.

You can use this method to control redirects. The API call of this method looks somewhat like:-

public boolean checkFormRedirect(pSuccessURL, pFailureURL, pRequest, pResponse);

Now, this method redirects to pSuccessURL if no form errors are found in the form. Otherwise, it redirects to pFailureURL.

Anshu Kumar
  • 633
  • 7
  • 12