title: Could somebody assist with doing API calls with 'httr' package in R?
body: <p>I tried to do a API call to get data from a website called <a href="https://developers.birdeye.com/#/reference/reviews/get/get-reviews" rel="nofollow noreferrer">BirdEye</a>. They have a developer website with instructions on API calls. However, I am having trouble converting curl code into R code using httr package. </p>
  
  <p>Example:</p>
  
  <pre><code>curl -H "content-type: application/json" -H "accept:application/json" -X POST -d { "fromDate":"04/01/2013", "toDate":"05/3/2015", "updateFromDate":"04/01/2013", "updateToDate":"05/3/2015", "sources":["google","citysearch"], "ratings":[1,2,3,4,5,0],"searchStr":"Awesome","subBusinessIds":[145308764185002,145308769721320,145308702026610],"tags":["tag_1","tag_2"] } "https://api.birdeye.com/resources/v1/review/businessId/755009344_1?sindex=0&amp;count=25&amp;api_key=92bcd6e0-c102-43fd-8a67-1a7be5258451" -v
  </code></pre>
  
  <p>Here is what I did:</p>
  
  <pre><code>headers &lt;- c('Accept' = 'application/json', 'Content-Type' = 'application/json')
  
  body_content &lt;- list('fromDate' = '2019-01-01', 'toDate' = '2019-05-01', 'sources' = 'google', 'ratings' = c(1, 2, 3, 4, 5, 0))
  
  resp &lt;- POST(url ="https://api.birdeye.com/resources/v1/review/businessId/xxxxxxxxxx?sindex=0&amp;count=20&amp;api_key=xxxxxxxxxxxxxxxxxxxxxxxxxxx",
               body = body_content, content_type("application/json"), accept("application/json"))
  </code></pre>
  
  <p>But I got an error message below:</p>
  
  <pre><code>Unexpected character ('-' (code 45)) in numeric value: expected digit (0-9) to follow minus sign, for valid numeric value
  
  Warning message:
  In charToRaw(enc2utf8(val)) :
    argument should be a character vector of length 1
  all but the first element will be ignored
  </code></pre>
  
  <p>Could someone help with the issue? Appreciate it!</p>