⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 http_get.1

📁 使用纯C编写的http get请求
💻 1
字号:
.TH http_get 1 "16 March 1999".SH NAMEhttp_get - get the contents of an http URL.SH SYNOPSIS.B http_get.RB [ -t.IR timeout ].RB [ -r.IR referer ].RB [ -u.IR user-agent ].RB [ -a.IR username:password ].RB [ -c.IR cookie ].RB [ -v ].I url.SH DESCRIPTION.PP.I http_getfetches an http URL and dumps the contents to stdout.It does not do gopher, ftp, file, news, or any other type of URL, only http.It can be configured to do https fetches as well..PPThe -t flag specifies a timeout in seconds.If that much time passes with no activity, the fetch is aborted.The default is 60 seconds..PPThe -r flag specifies a Referer header to send.Some tightly-clenched web admins like to jigger their server to onlyreturn files if the proper Referer is given..PPThe -u flag specifies a User-Agent header to send.Some *really* tightly-clenched web admins like to jigger their server to onlyreturn files if a well-known User-Agent is given..PPThe -a flag lets you do Basic Authentication..PPThe -c flag lets you pass in a cookie..PPThe -v flag is for debugging; it tells http_get to show the HTTP headersas well as the rest of the response..SH "EXIT STATUS".PPIf the fetch is successful (HTTP status 200), the command's exit status is 0.Otherwise the exit status is the HTTP status code.However, since a Unix command exit status is only one byte, the HTTP codesshow up mod 256.Adding to the confusion, csh interprets the status byte as signed, whilein other shells it is unsigned.Anyway, here is a table of some common status values:.nf    HTTP    sh      csh    200     0       0    302     46      46    304     48      48    400     144     -112    401     145     -111    403     147     -109    404     148     -108    408     152     -104    500     244     -12    501     245     -11    503     247     -9.fi.SH AUTHOROriginally based on a simple version by Al Globus <globus@nas.nasa.gov>.Debugged, prettified, and extended by Jef Poskanzer <jef@mail.acme.com>.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -