Internal Server Error 500 when running curl from batch file, but not when running directly on command line


I'm trying to make a (windows) batch file to run reports automatically. When I enter the curl command by hand, it works fine, returning the response with the "path" to the report that I expect. When I copy and paste the same exact command and run it from a batch file, I get an "Internal Server Error 500" message instead of the proper response.

I'm not sure I understand how running the exact same curl command from a batch file would be any different from running it directly on the command line? Has anyone seen something like that before?

Here's the response from "GET /":
"name": "prod-elasticsearch-2",
"cluster_name": "elasticsearch-prod",
"cluster_uuid": "LUQZIUonS7m7kHfwVuRqYg",
"version": {
"number": "6.2.4",
"build_hash": "ccec39f",
"build_date": "2018-04-12T20:37:28.497551Z",
"build_snapshot": false,
"lucene_version": "7.2.1",
"minimum_wire_compatibility_version": "5.6.0",
"minimum_index_compatibility_version": "5.0.0"
"tagline": "You Know, for Search"


You know what, I just realized it might be all the %'s in the URL, lemme try escaping them

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.