Could it be that the header should be 'Content-Type' (which is what I see in the relevant RFC) rather than 'Content-type' as shown in your email ? I don't know if headers are case-sensitive, but it's worth checking.
-Simon On Tue, May 29, 2018 at 11:02 AM, Roee Tarab <roeeta...@gmail.com> wrote: > Hi , > > I am having some troubles with pushing a features file to solr while > building an LTR model. I'm trying to upload a JSON file on windows cmd > executable from an already installed CURL folder, with the command: > > curl -XPUT 'http://localhost:8983/solr/techproducts/schema/feature-store' > --data-binary "@/path/myFeatures.json" -H 'Content-type:application/json'. > > I am receiving the following error massage: > > { > "responseHeader":{ > "status":500, > "QTime":7}, > "error":{ > "msg":"Bad Request", > "trace":"Bad Request (400) - Invalid content type > application/x-www-form-urlencoded; only application/json is > supported.\r\n\tat org.apache.solr.rest.RestManager$ManagedEndpoint. > parseJsonFromRequestBody(RestManager.java:407)\r\n\tat > org.apache.solr.rest. > RestManager$ManagedEndpoint.put(RestManager.java:340) .... > > This is definitely a technical issue, and I have not been able to overcome > it for 2 days. > > Is there another option of uploading the file to our core? Is there > something we are missing in our command? > > Thank you in advance for any help, >