How to extract data from a form on my site and send them to another

Editor X

Hi guys, I will briefly explain what I need to do.
My site will give the possibility to a group of users to upload “money” to their card.
The users have to enter some data to me in a form (First Name, Last Name, Card ID, how much money to upload).

The thing is this, once the users have filled out the form for me, when they press the button, I have to send all the data to another site, which processes the request and uploads precisely the money to the card.

Now, I almost certainly know that I have to do the thing with HTTP requests, the problem is that I don’t know how to use them at all, I’ve tried following a couple of tutorials, but I’m really struggling.

Do any of you know how I can automatically extract data from my form?

You’re on the right track with using HTTP requests to send data to another site. One quick caution: Make sure you have the right permissions to send data to the other site and that you’re compliant with data protection regulations.

You’d typically use an AJAX request or a server-side HTTP request to pass form data from one site to another. This would involve using methods like POST to send data securely. If you’re using JavaScript, you can collect form data using event listeners, then send it using the fetch API or XMLHttpRequest.
Now, since you said you’re having trouble with the tutorials, you might benefit from some step-by-step instructional content. I found these web scraping videos at Nannostomus super helpful for understanding data extraction and manipulation. They’re not strictly about API requests, but many of the underlying concepts overlap.