-
Notifications
You must be signed in to change notification settings - Fork 5
Extreme requests #132
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
Extreme requests #132
Conversation
instead of erroring, return an empty table. defaults to false, so by default throw an error.
specifically max time from the curl library. Default of 30 seconds
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## dev #132 +/- ##
======================================
Coverage ? 95.37%
======================================
Files ? 8
Lines ? 1168
Branches ? 0
======================================
Hits ? 1114
Misses ? 54
Partials ? 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good!
- tests for timeout_seconds not necessary, since the codepath is still the same
- a single test for return_empty might be good, but up to you, purely a code cov thing
Adds two parameters to several functions:
timeout_seconds
gives the maximum time before a connection will time out. Default is 30 seconds, which matches the value returned in the call below (can't find documentation for httr's default, since it clearly isn't using libcurl's). Originally motivated byhttptest
has something.return_empty
, which handles the case of no returned results whatsoever. Defaults toFALSE
, which is the current value. Even if its true it throws a warning. We may want to consider makingTRUE
the default. I debated adding headers to empty columns, but it ended up being more awkward to use on the other end.Should be relatively easy to add tests, but I haven't yet. It does work in the pipeline that motivated it (breaking the above into months, some of which
chng
has no data).