I didn't have curl in an ancient environment, but I had python.
$ python -c "import urllib2;r=urllib2.urlopen('http://www.python.org');print r.info();"
Server: nginx
Content-Type: text/html; charset=utf-8
X-Frame-Options: SAMEORIGIN
X-Clacks-Overhead: GNU Terry Pratchett
Content-Length: 47424
Accept-Ranges: bytes
Date: Tue, 27 Sep 2016 11:07:15 GMT
Via: 1.1 varnish
Age: 2297
Connection: close
X-Served-By: cache-sin6921-SIN
X-Cache: HIT
X-Cache-Hits: 10
Vary: Cookie
Public-Key-Pins: hogehoge
$
Reference: 20.6. Urllib2 — extensible library for opening URLs — Python 2.7.x documentation
Maybe this one is a little older?
$ python -c "import httplib;conn = httplib.HTTPSConnection('www.python.org');conn.request('GET','/');r1 = conn.getresponse();print r1.status, r1.reason"
200 OK
$
Reference: 20.7. httplib — HTTP Protocol Client — Python 2.7.x Documentation
If you look for http with one liner in python, you are a person who builds a web server below, so no, there is no one liner that is http get.
$ python -m SimpleHTTPServer 800
Reference: 20.19. SimpleHTTPServer — Concise HTTP Request Handler — Python 2.7.x Documentation
Does it contain perl in the first place? If so, it looks like the following. Well, if there is a module.
$ perl -MLWP::Simple -le'print get shift' http://www.dan.co.jp/
Reference: Leave one-liner to perl
wget? You don't know.
that's all.
Recommended Posts