Hi ..I am using _bulk for sending bulk requests to ES. When I run the code, I find the warning "Content type detection for rest requests is deprecated. Specify the content type using the [Content-Type] header.Deprecated field [template] used, expected [source] instead" as response and later it says status="BadRequest" in the log..Is there a way to set Content-type header manually? Tried a lot...Not able to fix it..Please help..Thanks in advance
The following is a part of the log image
What have you tried?
You need to also send the Content-Type HTTP header with the request. For the Bulk API, the header should be
Thanks for the reply..i have read the Bulk api doc attached...But am unable to change the content-type that is set..The content-type that is set is application/json.Can I set the Content-type to spplication/x-ndjson for Bulk API manually..Can it be done using curl command? Please suggest
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.