cURL request in javascript

Does anyone know how to send a cURL request through javascript? I’m trying to get an API key and the only way this particular place issues API keys is through cURL. I’ve never written JS without HTML, so I’m not even sure where to start with this. Here’s what I wrote for JS:

type: “POST”,
url: “curl -v -XPOST”, //replace with my email
dataType: “json”,
success: function(data) {


But how do I send just the request by itself?

Looks like you are using jquery to do a post request so you should not be calling curl in your javascript. cURL is a command line tool to do post requests and jquery already has built in ways to do post requests. Check out jquery ajax api in particular the post examples:

method: “POST”,
url: “some.php”,
data: { name: “John”, location: “Boston” }
.done(function( msg ) {
alert( "Data Saved: " + msg );

Thank you for the response. cURL is completely new to me. So do you know how I would send a request? Would I use node.js? I’m trying to read up on it now but I’m afraid it’s a bit over my head at the moment.

I found a tool to help me with the request!