How do I set cURL to always use the -k option?

2019-05-04 20:17发布

For some reason my version of darwin/bash/evn variables is not letting me co anything from the command line with https, I dunno why, but I have tried everything.

But I have found that cURL (the mean reason this is a problem for) can take a -k option or --insecure. This isn't great but its a hack that will work for now.

Could I just user alias curl='curl -k' ? I have never aliased something to overwrite a command that actually exists, will that even work?

1条回答
老娘就宠你
2楼-- · 2019-05-04 20:46

Aliasing commands is usually not a problem. You could also put -k or --insecure into $HOME/.curlrc:

echo insecure >> $HOME/.curlrc
查看更多
登录 后发表回答