[R] access http directories requiring authentication across platforms
jwiley.psych at gmail.com
Sat May 1 05:13:58 CEST 2010
Hello R users,
I am trying to read files from a website that requires authentication.
I have been working with url() to to open a connection in Windows.
con <- url(description="http://myusername:firstname.lastname@example.org/myfile.txt",
This works like a charm. My question is does this work across
platforms, or only on Windows? The reason I ask is this quote form
the ?url documentation
Note that 'https://' connections are only supported if
'--internet2' or 'setInternet2(TRUE)' was used (to make use of
Internet Explorer internals), and then only if the certificate is
considered to be valid. With that option only, the
'http://user:pass@site' notation for sites requiring
authentication is also accepted.
I am sending some scripts to people who use Mac OS X, and (I am
assuming) they will not have Internet Explorer installed. If it does
not work, is there a more general way? At least for now, the website
is not using encryption (regular http) and is using basic
authentication controlled via .htaccess and .htpasswd files.
Senior in Psychology
University of California, Riverside
More information about the R-help