Last active
November 8, 2016 06:58
-
-
Save bolerap/f4b85fc08dcb40f505d524bcd8e1c92e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Send GET request to github api to retrieve info of an github user without header | |
curl https://api.github.com/users/<username> | |
# Send GET request to github api to retrieve info of an github user with header | |
curl --include https://api.github.com/users/<username> | |
# or | |
curl -i https://api.github.com/users/<username> | |
# Send GET request with basic auth use user credential to github api to retrieve protected resources | |
curl --user "<username>:<password>" https://api.github.com/users/<username> | |
# or more secure with prompt require enter password | |
curl --user "<username>" https://api.github.com/users/<username> | |
# Dealing with https: if an api endpoint doesn't have ssl cert but its using https, we can ignore it by --insecure flag | |
curl --insecure https://api.abc.com/endpoint |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment