1

I have a gsp , i want to call the API of a 3rd party but i need to add headers on it but i haven't found the syntax suitable for it.

Following is the code:

<div class="container">
    <h1>Redirecting to Payment Gateway...</h1>
    <form action="${data.url}" method="POST" id="paymentForm">
        <g:each var="field" in="${data.data}">
            <input type="hidden" name="${field.key}" value="${field.value}"/>
        </g:each>
        <form>
</div>
iamrajshah
  • 963
  • 1
  • 11
  • 23
Tarro Eso
  • 21
  • 3

1 Answers1

0

I do not believe it is possible to set headers on a POST via a form. See discussion here How to set a Header field on POST a form? for more info as well as some other options for how to do what you need.

Daniel
  • 3,312
  • 1
  • 14
  • 31