We can use the authenticate()
helper function in httr
to build the authentication header for us w/o having to manually create it. Also, verbose()
can be used to debug HTTP issues:
httr::GET(url="https://api.github.com/orgs/:org/repos", httr::authenticate("user", "pass"), httr::verbose())