search for: httpbin

Displaying 5 results from an estimated 5 matches for "httpbin".

2015 Aug 27
1
Issues with libcurl + HTTP status codes (eg. 403, 404)
...ifferent from http status errors. Below some > real examples of servers returning http errors. For each example the > "internal" method correctly raises an R error, whereas the "libcurl" > method does not. > > # File not found (404) > download.file("http://httpbin.org/data.csv", "data.csv", method = "internal") > download.file("http://httpbin.org/data.csv", "data.csv", method = "libcurl") > readLines(url("http://httpbin.org/data.csv", method = "internal")) > readLines(url(&qu...
2015 Aug 27
3
Issues with libcurl + HTTP status codes (eg. 403, 404)
>>>>> "DM" == Duncan Murdoch <murdoch.duncan at gmail.com> >>>>> on Wed, 26 Aug 2015 19:07:23 -0400 writes: DM> On 26/08/2015 6:04 PM, Jeroen Ooms wrote: >> On Tue, Aug 25, 2015 at 10:33 PM, Martin Morgan <mtmorgan at fredhutch.org> wrote: >>> >>> actually I don't know that it does -- it
2020 Jan 11
1
SUGGESTION: Settings to disable forked processing in R, e.g. parallel::mclapply()
> On Jan 10, 2020, at 3:10 PM, G?bor Cs?rdi <csardi.gabor at gmail.com> wrote: > > On Fri, Jan 10, 2020 at 7:23 PM Simon Urbanek > <simon.urbanek at r-project.org> wrote: >> >> Henrik, >> >> the example from the post works just fine in CRAN R for me - the post was about homebrew build so it's conceivably a bug in their libraries. > > I
2012 May 02
1
Decompressing raw vectors in memory
Hi all, I'm struggling to decompress a gzip'd raw vector in memory: content <- readBin("http://httpbin.org/gzip", "raw", 1000) memDecompress(content, type = "gzip") # Error in memDecompress(content, type = "gzip") : # internal error -3 in memDecompress(2) I'm reasonably certain that the file is correctly compressed, because if I save it out to a file, I can...
2018 Dec 04
3
patch to support custom HTTP headers in download.file() and url()
...ils/tests/download.file.R @@ -0,0 +1,173 @@ + +## Tests for HTTP headers ----------------------------------------------- + +is_online <- function() { + tryCatch({ + con <- suppressWarnings(socketConnection("8.8.8.8", port = 53)) + close(con) + con <- url("http://eu.httpbin.org/headers") + lines <- readLines(con) + close(con) + stopifnot(any(grepl("Host.*eu.httpbin.org", lines))) + TRUE + }, error = function(e) FALSE) +} + +get_headers <- function(path = "anything", quiet = TRUE, ..., + protocol = &quo...