Comments (7)
Seems I found solution for the user agent.
client1 <- HttpClient$new(url = "https://httpbin.org")
client2 <- HttpClient$new(url = "https://httpbin.org", opts = list(useragent = "my-header"))
client1$get("user-agent")$parse()
# > [1] "{\n \"user-agent\": \"libcurl/7.52.1 r-curl/2.3 crul/0.2.0\"\n}\n"
client2$get("user-agent")$parse()
# > [1] "{\n \"user-agent\": \"my-header\"\n}\n"
from crul.
that's right on user-agent
will look into proxy
from crul.
@artemklevtsov reinstall - see ?proxies
after reinstall, let me know if it works for you
from crul.
3630d83 looks good. I'll test it tomorrow.
Thank you for the quick resolution.
from crul.
thx, did you try it ?
from crul.
Works fine:
devtools::install_github("ropensci/crul")
library(crul)
cl1 <- HttpClient$new(url = "http://ip.tyk.nu")
cl1$get()$parse("UTF-8")
#> [1] "46.*.*.*"
cl2 <- HttpClient$new(url = "http://ip.tyk.nu", proxies = proxy("103.28.225.180:8080"))
cl2$get()$parse("UTF-8")
#> [1] "103.28.225.180"
I think notes about user agent should be added to the man.
from crul.
Great, still need to figure way to support multiple proxies
from crul.
Related Issues (20)
- Add HttpClient tests for new number formatting
- Update docs telling users about number formatting for query params
- POSTing GraphQL Mutations? HOT 4
- How do you avoid exceeding the rate limit when making API calls? HOT 11
- S3 method for async ``$responses` method
- consider making `AsyncQueue` non-blocking
- How to retry requests for AsyncQueue? HOT 4
- Add support for pagination for Async calls HOT 3
- How to parse .xlsx content from crul response? HOT 4
- `Error in nchar(hh) : invalid multibyte string` when response has Latin1 headers HOT 1
- Async$get fails with non default disc param HOT 3
- server certificate verification failed. CAfile: none CRLfile: none HOT 2
- Integrate progress bars for Async requests HOT 3
- Number of parallel requests with AsyncVaried HOT 9
- use cookies from browser HOT 1
- tweak tests/egs to make cran happy HOT 1
- rgbif users reporting that "HTTP/2 stream was not closed cleanly before end of the underlying stream" HOT 4
- Fix errors in cran checks
- Add _PACKAGE thingy for pkg level doc
- cran checks fixes
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crul.