I cannot seem to get BITSADMIN to perform an HTTP(S) JSON request.
bitsadmin /create Job
bitsadmin /setcustomheaders Job "Content-Type:application/json" "Accept:application/json"
bitsadmin /addfile Job "https://jsonplaceholder.typicode.com/posts" a.json
Produces
Unable to add file - 0x80070057
The parameter is incorrect.
I know next to nothing about this stuff, and none of the stuff I manage to google online seems to touch what I am trying. With cURL I can just say:
curl "https://jsonplaceholder.typicode.com/posts" -o a.json
I am trying to avoid requiring my users to install cURL on their Windows boxes. And a number of my users are still sporting Windows 7, so the PowerShell Invoke-WebRequest applet doesn’t exist either...
Am I doing something wrong? (Like, am I using the wrong tool? Or am I just missing something that should be obvious?)