Can you edit or update with runnable code? e.g., the body argument is not valid '{ “_source”: ["_id", “quantity”, “cost”] }
Can you also run with curl verbose, like Search(..., config = httr::verbose()) and paste in the headers (REMOVING ANY SECURE INFORMATION) or at least look at them yourself to see if there’s anything wrong there.
after your suggestion and searching on the internet, I found the next workaround:
Search(“index”, body = ‘{ “_source”: ["_id"]}’, config= httr::add_headers(“Content-Type” = “application/json”))
Marybe there are easier ways, but at least it worked
So passing in httr::add_headers(“Content-Type” = “application/json”) worked?
I’ll keep looking at the code to see what might be causing that problem with the content type - seems it’s not being passed for some reason, seems to be dependent on your particular configuration so far.
before I posted this thread, I made sure I ran update.packages(“elastic”), so I was on the newest version (I thought).
When I do this I have version 0.7.8
Now I downloaded the suggested 0.8 version, installed it from a local zip file and now it all works without the addition of httr::add_header(…)