Skip to content

Instantly share code, notes, and snippets.

@noateden
Created June 4, 2019 04:10
Show Gist options
  • Save noateden/5a936f6fd566a0a055838dbf35f7df44 to your computer and use it in GitHub Desktop.
Save noateden/5a936f6fd566a0a055838dbf35f7df44 to your computer and use it in GitHub Desktop.
Example http request using javascript + jquery on client side
var settings = {
"async": true,
"crossDomain": true,
"url": "/docker/create/netapi",
"method": "POST",
"headers": {
"Content-Type": "application/x-www-form-urlencoded",
"cache-control": "no-cache",
},
"data": {
"name": netapi_name,
"port": netapi_port,
"ldbserver": netapi_ldbserver,
"ldbport": netapi_ldbport
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment