Skip to content

Instantly share code, notes, and snippets.

@kaiimran
Last active June 6, 2020 08:10
Show Gist options
  • Save kaiimran/694528359d22232e576b3456b9b8406e to your computer and use it in GitHub Desktop.
Save kaiimran/694528359d22232e576b3456b9b8406e to your computer and use it in GitHub Desktop.
GoGet API
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("button").click(function(){
$.ajax({
url: 'https://staging-api.goget.my/api/public/v1/jobs',
headers: {
'Authorization': 'Token token=xxfkh8o4nWLskzAL_KgZ',
'Content-type': 'application/json',
'Accept': 'application/json'
},
method: 'GET',
success: function(status){
alert("Status: " + status);
}
})
});
});
</script>
</head>
<body>
<button>Get jobs</button>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment