auth(user = "foo", pwd = "bar", auth = "basic")
auth(user = "foo", pwd = "bar", auth = "digest")
auth(user = "foo", pwd = "bar", auth = "ntlm")
auth(user = "foo", pwd = "bar", auth = "any")
# gssnegotiate auth
auth(NULL, NULL, "gssnegotiate")
if (FALSE) {
# with HttpClient
(res <- HttpClient$new(
url = "https://hb.opencpu.org/basic-auth/user/passwd",
auth = auth(user = "user", pwd = "passwd")
))
res$auth
x <- res$get()
jsonlite::fromJSON(x$parse("UTF-8"))
# with HttpRequest
(res <- HttpRequest$new(
url = "https://hb.opencpu.org/basic-auth/user/passwd",
auth = auth(user = "user", pwd = "passwd")
))
res$auth
}
Run the code above in your browser using DataLab