I am working on a shell script that would place get requests until the status is 202.
I have an issue with building the cURL command as mentioned below. Request is not being placed, even though the URL output by echo
is correct. What am I doing wrong here?
get_path=$BASE_URL$location_header
echo "$get_path"
get_result="$(curl -i -s -X GET $get_path -H "Content-Type: application/json" -H "Authorization: Bearer $4")"
GET $getpath
supposed to be one single argument to the-X
option? In any case,$getpath
should be double-quoted.$get_path
, or at least let us know what type of error you get? Also, when you double quoted, what did you double quote? The$get_path
string or theGET $get_path
string? Why do you even have-X GET
? Isn't that the default?http://localhost:8010/api/v0/part-of-url/syncJobs/5lhf51rrd1jxw
* Closing connection -1