TIBHannover / BacDiveR

Inofficial R client for the DSMZ's Bacterial Diversity Metadatabase (former contact: @katrinleinweber). https://api.bacdive.dsmz.de/client_examples seems to be the official alternatives.
https://TIBHannover.GitHub.io/BacDiveR/
MIT License
10 stars 12 forks source link

Replace httr with crul? #97

Open katrinleinweber opened 5 years ago

katrinleinweber commented 5 years ago

After switching from the old RCurl (which required repairing unescaped whitespace) to the more current, R-escaping-friendly httr, I could keep an eye on the crul-beta. The replacement code would be:

x <- crul::HttpClient$new(URL, auth = crul::auth(cred[1], cred[2]))$get()
jsonlite::fromJSON(x$parse("UTF-8"))