I find it very suspicious that the error message has a leading quotation mark before https:
curl: (6) Could not resolve host: " https
Usually when the url is invalid you get something like that:
$ export TEST_URI="http::://dafsf//asdf"
$ curl -X -GET $TEST_URI