development

curl: (55) Failed sending HTTP POST request

Synopsis

I got the curl: (55) Failed sending HTTP POST request error while trying to make a POST call to a pingable URL.

The error is misleading. It does not inform about the error cause of the error.

Solution

  • Revisit the request carefully.
  • Make sure that all headers are in proper syntax (Key: value)
  • URL is enclosed in ''
  • All flags are valid.

In my case, one of the request headers missed its key during copy from the clipboard.

$ curl -v POST \ 
  https://myhost.com/page \
  -H ': application/json' \
  -d '{
    "api_key": "1234"
}'

Can you spot the error? 🙂

Categories: development

Tagged as: , ,

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.