Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Sending information via HTTP "POST" without submitting a form

by jeyroz (Monk)
on Jun 20, 2005 at 21:31 UTC ( #468497=perlquestion: print w/replies, xml ) Need Help??

jeyroz has asked for the wisdom of the Perl Monks concerning the following question:

Is anyone familiar with a technique for sending information via HTTP "POST" without submitting a form?

Here is a rundown of what is going on:
A form is being used to send payment information directly to a gateway processor (whose backend process we have no hand in). There are several form elements that need to be validated (server-side, no javascript) before the request is processed. I've pointed the form "action" back to my own script to handle validation and plan on redirecting the information to the gateway script upon success. I am hoping to send the info via POST rather than attaching it to a redirect URL (via GET).

Any ideas?

As always, thanks ahead of time for your help!

author => jeyroz

  • Comment on Sending information via HTTP "POST" without submitting a form

Replies are listed 'Best First'.
Re: Spoofing an HTTP POST
by gellyfish (Monsignor) on Jun 20, 2005 at 21:43 UTC

      Thanks for the response Jellyfish!

      I previously looked into LWP as a solution (and will again) but ran into a problem in this instance. I don't want to post the informaiton and gather the response (for display on my server), I want the user (the person submitting the data) to be able to continue with the payment process (additional form inputs) on the gateway's server.

      Does that make sense? Am I missing something?

      author => jeyroz

        What you're explaining doesn't make sense to me, based on what I've had to do before with passing control between systems. I'm guessing that the payment processor most likely has suggestions on how to use their system, and if they think the scenario that you are explaining makes sense, that they would have instructions for doing it.

Re: Sending information via HTTP "POST" without submitting a form
by rob_au (Abbot) on Jun 20, 2005 at 22:53 UTC
    The Javascript XMLHTTPRequest object may be used for this purpose - There is an article on ( which describes a solution for a situation similar to what you outline.


    perl -le "print unpack'N', pack'B32', '00000000000000000000001000000000'"

      Thank you for your help. I'll check out the article!

      author => jeyroz

Re: Sending information via HTTP "POST" without submitting a form
by jasonk (Parson) on Jun 21, 2005 at 13:15 UTC

    Also take a look at Business::OnlinePayment which handles credit card processing for many different payment processers using exactly this method.

    We're not surrounded, we're in a target-rich environment!

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://468497]
Approved by bmann
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (1)
As of 2023-09-23 05:34 GMT
Find Nodes?
    Voting Booth?

    No recent polls found