curl -s http://httpbin.org | head -n 10
Headers Only
curl -Is http://httpbin.org curl -Is example.com
curl -sI -G -d "name=jim" http://httpbin.org -o /dev/null
REFERENCE: https://docs.github.com/en/rest/guides/getting-started-with-the-rest-api
curl https://api.github.com/zen
Add -s (silent)
curl -s https://api.github.com/zen
Info about user defunkt
curl -s https://api.github.com/users/defunkt
export token=$(Rscript -e "cat(Sys.getenv('GITHUB_PAT'))") curl -si -u jimrothstein:$token https://api.github.com/users/octocat
Collaborators is private.
export token=$(Rscript -e "cat(Sys.getenv('GITHUB_PAT'))") curl -s -u jimrothstein:$token https://api.github.com/repos/jimrothstein/try_things_here/collaborators
# knitr::knit_exit()
file <- "slide_curl_intro_github.Rmd" file <- normalizePath(file) file rmarkdown::render(file, output_dir="~/Downloads/print_and_delete")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.