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

replaced redundant call to read_csv with httr::content #19

Merged
merged 1 commit into from Feb 2, 2020

Conversation

Chrisjb
Copy link
Contributor

@Chrisjb Chrisjb commented Feb 2, 2020

I noticed that in utils-get-data.R we call httr::GET() which gets the data as a response. This step just seems to be to check there are no errors. Later on the data is read in with readr::read_csv(api_get$url) which then requests the data again.

It would be better to use httr::content(api_get) which parses the response we already have (using readr too) rather than fetching it again.

evanodell added a commit that referenced this pull request Feb 2, 2020
Merge branch 'Chrisjb-master'
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
@evanodell evanodell merged commit 68c920f into ropensci:master Feb 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants