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

> ### Name: post-requests
> ### Title: HTTP POST/PUT/PATCH requests
> ### Aliases: post-requests
> 
> ### ** Examples
> 
> (x <- HttpClient$new(url = "https://httpbin.org"))
<crul connection> 
  url: https://httpbin.org
  curl options: 
  proxies: 
  auth: 
  headers: 
> 
> # POST requests
> ## a list
> (res_post <- x$post('post', body = list(hello = "world"), verbose = TRUE))
<crul response> 
  url: https://httpbin.org/post
  request_headers: 
    User-Agent: libcurl/7.54.1 r-curl/2.8.1 crul/0.3.8
    Accept-Encoding: gzip, deflate
  response_headers: 
    status: HTTP/1.1 200 OK
    connection: keep-alive
    server: meinheld/0.6.1
    date: Fri, 04 Aug 2017 06:53:46 GMT
    content-type: application/json
    access-control-allow-origin: *
    access-control-allow-credentials: true
    x-powered-by: Flask
    x-processed-time: 0.000869035720825
    content-length: 498
    via: 1.1 vegur
  status: 200
> 
> ## a string
> (res_post <- x$post('post', body = "hello world", verbose = TRUE))
<crul response> 
  url: https://httpbin.org/post
  request_headers: 
    User-Agent: libcurl/7.54.1 r-curl/2.8.1 crul/0.3.8
    Accept-Encoding: gzip, deflate
  response_headers: 
    status: HTTP/1.1 200 OK
    connection: keep-alive
    server: meinheld/0.6.1
    date: Fri, 04 Aug 2017 06:53:46 GMT
    content-type: application/json
    access-control-allow-origin: *
    access-control-allow-credentials: true
    x-powered-by: Flask
    x-processed-time: 0.000808000564575
    content-length: 461
    via: 1.1 vegur
  status: 200
> 
> ## empty body request
> x$post('post')
<crul response> 
  url: https://httpbin.org/post
  request_headers: 
    User-Agent: libcurl/7.54.1 r-curl/2.8.1 crul/0.3.8
    Accept-Encoding: gzip, deflate
  response_headers: 
    status: HTTP/1.1 200 OK
    connection: keep-alive
    server: meinheld/0.6.1
    date: Fri, 04 Aug 2017 06:53:46 GMT
    content-type: application/json
    access-control-allow-origin: *
    access-control-allow-credentials: true
    x-powered-by: Flask
    x-processed-time: 0.000797986984253
    content-length: 435
    via: 1.1 vegur
  status: 200
> 
> ## form requests
> ## Not run: 
> ##D (cli <- HttpClient$new(
> ##D   url = "http://apps.kew.org/wcsp/advsearch.do"
> ##D ))
> ##D cli$post(
> ##D   encode = "form",
> ##D   body = list(
> ##D     page = 'advancedSearch',
> ##D     genus = 'Gagea',
> ##D     species = 'pratensis',
> ##D     selectedLevel = 'cont'
> ##D   )
> ##D )
> ## End(Not run)
> 
> (x <- HttpClient$new(url = "https://httpbin.org"))
<crul connection> 
  url: https://httpbin.org
  curl options: 
  proxies: 
  auth: 
  headers: 
> res <- x$post("post",
+   encode = "json",
+   body = list(
+     genus = 'Gagea',
+     species = 'pratensis'
+   )
+ )
> jsonlite::fromJSON(res$parse())
* Found bundle for host httpbin.org: 0x95075f0 [can pipeline]
* Re-using existing connection! (#1) with host httpbin.org
* Connected to httpbin.org (23.23.112.149) port 443 (#1)
> POST /post HTTP/1.1
Host: httpbin.org
Accept: */*
User-Agent: libcurl/7.54.1 r-curl/2.8.1 crul/0.3.8
Accept-Encoding: gzip, deflate
Content-Length: 145
Content-Type: multipart/form-data; boundary=------------------------b476d12c438b4969

< HTTP/1.1 200 OK
< Connection: keep-alive
< Server: meinheld/0.6.1
< Date: Fri, 04 Aug 2017 06:53:46 GMT
< Content-Type: application/json
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Credentials: true
< X-Powered-By: Flask
< X-Processed-Time: 0.000869035720825
< Content-Length: 498
< Via: 1.1 vegur
< 
* Connection #1 to host httpbin.org left intact
* Found bundle for host httpbin.org: 0x95075f0 [can pipeline]
* Re-using existing connection! (#1) with host httpbin.org
* Connected to httpbin.org (23.23.112.149) port 443 (#1)
> POST /post HTTP/1.1
Host: httpbin.org
Accept: */*
User-Agent: libcurl/7.54.1 r-curl/2.8.1 crul/0.3.8
Accept-Encoding: gzip, deflate
Content-Length: 11
Content-Type: application/x-www-form-urlencoded

* upload completely sent off: 11 out of 11 bytes
< HTTP/1.1 200 OK
< Connection: keep-alive
< Server: meinheld/0.6.1
< Date: Fri, 04 Aug 2017 06:53:46 GMT
< Content-Type: application/json
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Credentials: true
< X-Powered-By: Flask
< X-Processed-Time: 0.000808000564575
< Content-Length: 461
< Via: 1.1 vegur
< 
* Connection #1 to host httpbin.org left intact
No encoding supplied: defaulting to UTF-8.
$args
named list()

$data
[1] "{\"genus\":\"Gagea\",\"species\":\"pratensis\"}"

$files
named list()

$form
named list()

$headers
$headers$Accept
[1] "*/*"

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

$headers$Connection
[1] "close"

$headers$`Content-Length`
[1] "39"

$headers$`Content-Type`
[1] "application/json"

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

$headers$`User-Agent`
[1] "libcurl/7.54.1 r-curl/2.8.1 crul/0.3.8"


$json
$json$genus
[1] "Gagea"

$json$species
[1] "pratensis"


$origin
[1] "129.217.207.166"

$url
[1] "https://httpbin.org/post"

> 
> # PUT requests
> (x <- HttpClient$new(url = "https://httpbin.org"))
<crul connection> 
  url: https://httpbin.org
  curl options: 
  proxies: 
  auth: 
  headers: 
> (res <- x$put(path = "put",
+   encode = "json",
+   body = list(
+     genus = 'Gagea',
+     species = 'pratensis'
+   )
+ ))
<crul response> 
  url: https://httpbin.org/put
  request_headers: 
    Content-Type: application/json
    User-Agent: libcurl/7.54.1 r-curl/2.8.1 crul/0.3.8
    Accept-Encoding: gzip, deflate
  response_headers: 
    status: HTTP/1.1 200 OK
    connection: keep-alive
    server: meinheld/0.6.1
    date: Fri, 04 Aug 2017 06:53:47 GMT
    content-type: application/json
    access-control-allow-origin: *
    access-control-allow-credentials: true
    x-powered-by: Flask
    x-processed-time: 0.0012948513031
    content-length: 516
    via: 1.1 vegur
  status: 200
> jsonlite::fromJSON(res$parse("UTF-8"))
$args
named list()

$data
[1] "{\"genus\":\"Gagea\",\"species\":\"pratensis\"}"

$files
named list()

$form
named list()

$headers
$headers$Accept
[1] "*/*"

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

$headers$Connection
[1] "close"

$headers$`Content-Length`
[1] "39"

$headers$`Content-Type`
[1] "application/json"

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

$headers$`User-Agent`
[1] "libcurl/7.54.1 r-curl/2.8.1 crul/0.3.8"


$json
$json$genus
[1] "Gagea"

$json$species
[1] "pratensis"


$origin
[1] "129.217.207.166"

$url
[1] "https://httpbin.org/put"

> 
> res <- x$put("put", body = "foo bar")
> jsonlite::fromJSON(res$parse("UTF-8"))
Error: lexical error: invalid char in json text.
                                       <html><head><title>Request Time
                     (right here) ------^
Execution halted