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 curl options globally #48

Closed
sckott opened this issue Sep 27, 2017 · 4 comments · Fixed by #85
Closed

set curl options globally #48

sckott opened this issue Sep 27, 2017 · 4 comments · Fixed by #85
Milestone

Comments

@sckott
Copy link
Collaborator

sckott commented Sep 27, 2017

main use case is when using crul inside a package, becomes esp. important when e.g., a pkg foo uses crul, then another pkg bar uses foo, which makes likelihood of arg. collisions more likely

@sckott sckott modified the milestones: v0.4, v0.5 Oct 1, 2017
@sckott sckott modified the milestones: v0.5, v0.6 Jan 19, 2018
sckott added a commit that referenced this issue Apr 18, 2018
@sckott
Copy link
Collaborator Author

sckott commented Apr 18, 2018

@maelle can you give it a try when you get a chance? if so, install like remotes::install_github("ropensci/crul@set-options") and then see the examples in ?crul-options

note that the options set with these new functions are only picked up on function intialization, so if you set new options you have to remake the client object. let me know if that seems good or not.

@sckott
Copy link
Collaborator Author

sckott commented Apr 18, 2018

also @dirkschumacher and @mikkelkrogsholm - see above comment, any thoughts on how these functions are implemented? let me know if any questions/problems

@maelle
Copy link
Member

maelle commented Apr 19, 2018

Does this mean an user could set the agent in their .Rprofile for instance and thus overrides all possible agent arguments? (which would be good I guess cf https://twitter.com/hrbrmstr/status/986339163833339904)

@sckott
Copy link
Collaborator Author

sckott commented Apr 19, 2018

doesn't support using a file, but I did think about that.

I looked around at other http clients and didn't see any examples of using a file. But doesn't mean we can't do it. I do worry a bit about users setting these things in a file and then forgetting about them, and then wondering what's going wrong later on. I guess one could simply give a message or so reminding the user that they are using options from a file.

@sckott sckott closed this as completed in #85 Jul 8, 2018
sckott added a commit that referenced this issue Jul 8, 2018
* add ropensci footer to readme

* #48 added set_* fxns - working with httpclient and httprequest and thus async/asyncvaried
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 a pull request may close this issue.

2 participants