Using httr to obtain a report from site using oath2.0 I am unable to convert the raw content into a character set within R.
> req <-GET("https://www.blah.com/blah/v2/blah", config(token = token))
My response indicates no issue:
Response [https://www.blah.com/blah/v2/blah]
Date: 2018-09-21 15:55
Status: 200
Content-Type: text/tab-separated-values; charset=utf-16le
Size: 21.1 MB
NA
When attempting to convert my raw data to char I get:
> rawToChar(req$content)
Error in rawToChar(req$content) :
embedded nul in string:
I also obtain the following error when checking content via content():
> content(req)
Error in guess_header_(datasource, tokenizer, locale) :
Incomplete multibyte sequence
Any thoughts? I've found limited resources on this on the web...