getpost
v0.1.0
Published
get or post the url by command line
Downloads
5
Readme
get or post the url by command line
Install:
npm install -g getpost
Use:
GET:
get [http://]www.example.com?query=xxxx
get www.example.com/example.jpg
getpost [g] [http://]www.example.com?query=xxxxx
POST:
post [http://]www.example.com[?query=xxxx] ['{"headers": {"User-Agent": "request"}, "form": {"name": "name"}}']
getpost p [http://]www.example.com[?query=xxxxx] ['{"headers": {"User-Agent": "request"}, "form": {"name": "name"}}']
Note:
- If the response Content-Type is not 'text/*' or '*/json', it will save the file at current directory.
- For pretty-printing JSON, please install json.