getpost

0.1.0 • Public • Published

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:

  1. If the response Content-Type is not 'text/*' or '*/json', it will save the file at current directory.
  2. For pretty-printing JSON, please install json.

Readme

Keywords

Package Sidebar

Install

npm i getpost

Weekly Downloads

4

Version

0.1.0

License

ISC

Last publish

Collaborators

  • homfen