Skip to content

Instantly share code, notes, and snippets.

@rg3915
Last active February 7, 2018 10:28
Show Gist options
  • Save rg3915/b0ed272af07d09aaaf8badd697714f53 to your computer and use it in GitHub Desktop.
Save rg3915/b0ed272af07d09aaaf8badd697714f53 to your computer and use it in GitHub Desktop.
Api GitHub with Python and Ajax example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<!-- jQuery -->
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
</head>
<body>
<script>
$.get('https://api.github.com/users/rg3915', function(data) {
console.log(data);
});
</script>
</body>
</html>
import requests
url = 'https://api.github.com/users/rg3915'
response = requests.get(url)
print(response.json())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment