RESTful API not working "curl: (52) Empty reply from server"

Hi, I’m new to Hass using Hass.io 0.65.6
i am trying to get ifttt to send requests to home assistant using the rest api.
None of the applets i am creating is working.
When i call following code to check if the api is running

curl -X GET
-H “x-ha-access: YOUR_PASSWORD”
-H “Content-Type: application/json”
http://IP_ADDRESS:8123/ENDPOINT

it returns following message:

curl: (52) Empty reply from server

I tried this also with my external url https://URL.org:8123/api
then it returns

invalid character in header

I double checked every setting i could think of.

Any ideas?

If you can give some more details I might be able to help.
What exactly are you trying to do ?

I currently use the rest API to switch an input Boolean ( via macrodroid ) and IFTTT to update a rest sensor, both without issue.

I dont know why, but it works now with the external url, thanks for answering

Also the same experience here. Only works with external URL.