如何从命令行发送HTTP OPTIONS请求? [英] How to send a HTTP OPTIONS request from the command line?

查看:661
本文介绍了如何从命令行发送HTTP OPTIONS请求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用cURL,但似乎默认情况下(Debian)不是编译HTTPS支持,我不想自己构建它。

I tried to use cURL but it seems that by default (Debian) is not compiled with HTTPS support and I dont want to build it myself.

wget 似乎有SSL支持,但我没有发现如何使用wget生成OPTIONS HTTP请求的信息。

wget seems to have SSL support but I found no information on how to generate an OPTIONS HTTP request with wget.

推荐答案

首先,默认情况下在Debian中安装的curl支持HTTPS,因为很久以前。 (很久以前,有两个单独的包,一个包含和一个没有SSL,但不是这样)

First, the curl installed by default in Debian supports HTTPS since a great while back. (a long time ago there were two separate packages, one with and one without SSL but that's not the case anymore)

其次,您可以发送一个OPTIONS请求curl like这:

Secondly, you can send an OPTIONS request with curl like this:

curl -i -X OPTIONS http://example.org/path

您也可以使用 -v ,而不是 / code>以查看更多输出。

You may also use -v instead of -i to see more output.

这篇关于如何从命令行发送HTTP OPTIONS请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆