Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set httr user_agent #397

Closed
wibeasley opened this issue Jul 19, 2022 · 0 comments
Closed

set httr user_agent #397

wibeasley opened this issue Jul 19, 2022 · 0 comments
Assignees

Comments

@wibeasley
Copy link
Member

https://httr.r-lib.org/reference/user_agent.html

Following advice of httr vignette:

While we’re in this function, there’s one important header that you should set for every API wrapper: the user agent. The user agent is a string used to identify the client. This is most useful for the API owner as it allows them to see who is using the API. It’s also useful for you if you have a contact on the inside as it often makes it easier for them to pull your requests from their logs and see what’s going wrong. If you’re hitting a commercial API, this also makes it easier for internal R advocates to see how many people are using their API via R and hopefully assign more resources.

A good default for an R API package wrapper is to make it the URL to your GitHub repo:

I'm going to user just "OuhscBbmc/REDCapR" instead of the full "https://github.com/OuhscBbmc/REDCapR". I don't want any University's security team casually review the REDCapR code and wonder if it's contacting another server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant