How to use with the Axios JavaScript library (useful for React)

Created by Alison Gianotto, Modified on Wed, 17 Dec, 2025 at 2:42 PM by Brady Wetherington

Use Axios as normal, CORS support is enabled.


<html>
<head>
<script src="https://unpkg.com/goodforms@0.9.2"></script>
<title>Simple Axios/CORS Test?</title>
</head>
<body>
<p>
    Axios test
</p>
<div id="react-basic"></div>


<input type='text' name='email' id='email' onchange="handle_change(this.value)" /><input type='submit' />


<script>
</script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script>
function handle_change(param) {
    console.warn("Handling change!");
    console.dir(param);

    axios.post("https://api.goodforms.com/verify", {
        form_key: 'your_form_token',
        email: param
    }).then(function (result) {
        console.warn("Got result from Axios!!!")
        console.dir(result)
        console.warn("And here's the data part:")
        console.dir(result.data)
    })
}
</script>
</body>
</html>


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article