I noticed some strange behaviour of mcapply
in combination with httr
. Namely,
When using lapply
, everything works fine. That is I iteratre through some ids
and create httr::GET
statements to my server.
ret <- lapply(ids, FUN = make_call)
make_call <- function(id) {
httr::GET...
}
However, when changing to ret <- parallel::mclapply(ids, FUN = make_call)
, I get:
[[1]]
[1] "Error in curl::curl_fetch_memory(url, handle = handle) : \n Illegal or missing hexadecimal sequence in chunked-encoding\n"
attr(,"class")
[1] "try-error"
attr(,"condition")
<simpleError in curl::curl_fetch_memory(url, handle = handle): Illegal or missing hexadecimal sequence in chunked-encoding>
[[2]]
[1] "Error in curl::curl_fetch_memory(url, handle = handle) : \n Received HTTP/0.9 when not allowed\n"
attr(,"class")
[1] "try-error"
attr(,"condition")
<simpleError in curl::curl_fetch_memory(url, handle = handle): Received HTTP/0.9 when not allowed>
Any ideas what's going on here?