h = c("X-AG-Access-Token" = key
, "Content-Type" = "text/raw"
, "outputformat" = "application/json; charset=utf-8")
b<-list(body=upload_file("test.txt"))
POST(url=api
,add_headers(.headers=h)
,accept_json()
,encode = "multipart"
,body=text
,verbose())
I've been working with this code for a few days and would greatly appreciate any help!