curl:(55)无法发送HTTP POST请求

时间:2019-11-15 08:51:42

标签: http curl

我在尝试对可ping URL进行POST调用时遇到curl: (55) Failed sending HTTP POST request错误。

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

2 个答案:

答案 0 :(得分:1)

  • 仔细查看请求。
  • 确保所有标头都采用正确的语法(键:值)
  • URL已正确包含在''
  • 所有命令标志均有效。

就我而言,从剪贴板复制时,请求标头之一错过了它的密钥。

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

答案 1 :(得分:0)

I was getting the same one my local machine due to lack of memory.

in order to solve it we need to set jvm ops so that heap memory can be reserve as per the config

enter image description here