pablobarbera / roauth Goto Github PK
View Code? Open in Web Editor NEWThis project forked from geoffjentry/roauth
OAuth implementation for R
Home Page: http://cran.r-project.org/web/packages/ROAuth/index.html
This project forked from geoffjentry/roauth
OAuth implementation for R
Home Page: http://cran.r-project.org/web/packages/ROAuth/index.html
The documentation describes customHeader
as follows:
The
customHeader
argument toOAuthRequest
can be used to pass additional HTTP header commands to the underlying request.
However I could not get this to work, nor could I find any examples of how this should work in practice. For example, I tried:
credentials$OAuthRequest(URL, "GET", customHeader=c(Accept="application/json"))
credentials$OAuthRequest(URL, "GET", customHeader=c("Accept: application/json"))
credentials$OAuthRequest(URL, "GET", customHeader=c("Accept=application/json"))
...but none of these set the custom header in the request.
So I reviewed the definition of OAuthRequest
and found that it passes through the customHeader
to the appropriate httpFunc
(either oauthPOST
or oauthGET
). But as far as I can tell, neither of these functions do anything with the customHeader
. So passing the customHeader
argument to OAuthRequest()
has no effect. If this is correct, then customHeader
is not actually implemented in ROAuth
even though it is described in the documentation.
In the end I resorted to using a custom curl handle:
mycurl = getCurlHandle()
curlSetOpt(.opts = list(httpheader = c(Accept="application/json")), curl=mycurl)
result <- credentials$OAuthRequest(URL, "GET", curl=mycurl)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.