Running examples in ‘crul-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: HttpClient
> ### Title: HTTP client
> ### Aliases: HttpClient
> ### Keywords: datasets
> 
> ### ** Examples
> 
> (x <- HttpClient$new(url = "https://httpbin.org"))
<crul connection> 
  url: https://httpbin.org
  curl options: 
  proxies: 
  auth: 
  headers: 
> x$url
[1] "https://httpbin.org"
> (res_get1 <- x$get('get'))
<crul response> 
  url: https://httpbin.org/get
  request_headers: 
    User-Agent: libcurl/7.58.0 r-curl/3.2 crul/0.5.2
    Accept-Encoding: gzip, deflate
    Accept: application/json, text/xml, application/xml, */*
  response_headers: 
    status: HTTP/1.1 200 OK
    connection: keep-alive
    server: gunicorn/19.7.1
    date: Tue, 08 May 2018 17:25:14 GMT
    content-type: application/json
    access-control-allow-origin: *
    access-control-allow-credentials: true
    x-powered-by: Flask
    x-processed-time: 0
    content-length: 327
    via: 1.1 vegur
  status: 200
> res_get1$content
  [1] 7b 0a 20 20 22 61 72 67 73 22 3a 20 7b 7d 2c 20 0a 20 20 22 68 65 61 64 65
 [26] 72 73 22 3a 20 7b 0a 20 20 20 20 22 41 63 63 65 70 74 22 3a 20 22 61 70 70
 [51] 6c 69 63 61 74 69 6f 6e 2f 6a 73 6f 6e 2c 20 74 65 78 74 2f 78 6d 6c 2c 20
 [76] 61 70 70 6c 69 63 61 74 69 6f 6e 2f 78 6d 6c 2c 20 2a 2f 2a 22 2c 20 0a 20
[101] 20 20 20 22 41 63 63 65 70 74 2d 45 6e 63 6f 64 69 6e 67 22 3a 20 22 67 7a
[126] 69 70 2c 20 64 65 66 6c 61 74 65 22 2c 20 0a 20 20 20 20 22 43 6f 6e 6e 65
[151] 63 74 69 6f 6e 22 3a 20 22 63 6c 6f 73 65 22 2c 20 0a 20 20 20 20 22 48 6f
[176] 73 74 22 3a 20 22 68 74 74 70 62 69 6e 2e 6f 72 67 22 2c 20 0a 20 20 20 20
[201] 22 55 73 65 72 2d 41 67 65 6e 74 22 3a 20 22 6c 69 62 63 75 72 6c 2f 37 2e
[226] 35 38 2e 30 20 72 2d 63 75 72 6c 2f 33 2e 32 20 63 72 75 6c 2f 30 2e 35 2e
[251] 32 22 0a 20 20 7d 2c 20 0a 20 20 22 6f 72 69 67 69 6e 22 3a 20 22 31 33 37
[276] 2e 32 30 38 2e 35 37 2e 31 34 31 22 2c 20 0a 20 20 22 75 72 6c 22 3a 20 22
[301] 68 74 74 70 73 3a 2f 2f 68 74 74 70 62 69 6e 2e 6f 72 67 2f 67 65 74 22 0a
[326] 7d 0a
> res_get1$response_headers
$status
[1] "HTTP/1.1 200 OK"

$connection
[1] "keep-alive"

$server
[1] "gunicorn/19.7.1"

$date
[1] "Tue, 08 May 2018 17:25:14 GMT"

$`content-type`
[1] "application/json"

$`access-control-allow-origin`
[1] "*"

$`access-control-allow-credentials`
[1] "true"

$`x-powered-by`
[1] "Flask"

$`x-processed-time`
[1] "0"

$`content-length`
[1] "327"

$via
[1] "1.1 vegur"

> res_get1$parse()
No encoding supplied: defaulting to UTF-8.
[1] "{\n  \"args\": {}, \n  \"headers\": {\n    \"Accept\": \"application/json, text/xml, application/xml, */*\", \n    \"Accept-Encoding\": \"gzip, deflate\", \n    \"Connection\": \"close\", \n    \"Host\": \"httpbin.org\", \n    \"User-Agent\": \"libcurl/7.58.0 r-curl/3.2 crul/0.5.2\"\n  }, \n  \"origin\": \"137.208.57.141\", \n  \"url\": \"https://httpbin.org/get\"\n}\n"
> 
> (res_get2 <- x$get('get', query = list(hello = "world")))
<crul response> 
  url: https://httpbin.org/get?hello=world
  request_headers: 
    User-Agent: libcurl/7.58.0 r-curl/3.2 crul/0.5.2
    Accept-Encoding: gzip, deflate
    Accept: application/json, text/xml, application/xml, */*
  response_headers: 
    status: HTTP/1.1 200 OK
    connection: keep-alive
    server: gunicorn/19.7.1
    date: Tue, 08 May 2018 17:25:40 GMT
    content-type: application/json
    access-control-allow-origin: *
    access-control-allow-credentials: true
    x-powered-by: Flask
    x-processed-time: 0
    content-length: 363
    via: 1.1 vegur
  params: 
    hello: world
  status: 200
> res_get2$parse()
No encoding supplied: defaulting to UTF-8.
[1] "{\n  \"args\": {\n    \"hello\": \"world\"\n  }, \n  \"headers\": {\n    \"Accept\": \"application/json, text/xml, application/xml, */*\", \n    \"Accept-Encoding\": \"gzip, deflate\", \n    \"Connection\": \"close\", \n    \"Host\": \"httpbin.org\", \n    \"User-Agent\": \"libcurl/7.58.0 r-curl/3.2 crul/0.5.2\"\n  }, \n  \"origin\": \"137.208.57.141\", \n  \"url\": \"https://httpbin.org/get?hello=world\"\n}\n"
> library("jsonlite")
> jsonlite::fromJSON(res_get2$parse())
No encoding supplied: defaulting to UTF-8.
$args
$args$hello
[1] "world"


$headers
$headers$Accept
[1] "application/json, text/xml, application/xml, */*"

$headers$`Accept-Encoding`
[1] "gzip, deflate"

$headers$Connection
[1] "close"

$headers$Host
[1] "httpbin.org"

$headers$`User-Agent`
[1] "libcurl/7.58.0 r-curl/3.2 crul/0.5.2"


$origin
[1] "137.208.57.141"

$url
[1] "https://httpbin.org/get?hello=world"

> 
> # post request
> (res_post <- x$post('post', body = list(hello = "world")))
<crul response> 
  url: https://httpbin.org/post
  request_headers: 
    User-Agent: libcurl/7.58.0 r-curl/3.2 crul/0.5.2
    Accept-Encoding: gzip, deflate
    Accept: application/json, text/xml, application/xml, */*
  response_headers: 
    status: HTTP/1.1 200 OK
    connection: keep-alive
    server: gunicorn/19.7.1
    date: Tue, 08 May 2018 17:25:55 GMT
    content-type: application/json
    access-control-allow-origin: *
    access-control-allow-credentials: true
    x-powered-by: Flask
    x-processed-time: 0
    content-length: 540
    via: 1.1 vegur
  status: 200
> 
> ## empty body request
> x$post('post')
Error in curl::curl_fetch_memory(x$url$url, handle = x$url$handle) : 
  GnuTLS recv error (-110): The TLS connection was non-properly terminated.
Calls: <Anonymous> -> <Anonymous> -> crul_fetch -> <Anonymous>
Execution halted