resen
v0.13.4
Published
Command-line HTTP client
Downloads
84
Maintainers
Readme
Resen
The Resen a command-line HTTP client.
Simple command-line HTTP client.
GitHub:
Why
The HTTPie command is a very good program, but it cannot be installed with the npm package manager. What we have is not a command line program.
Install
npm i -g resenAfter installation, we get a res command. Check:
res --versionUsing
Methods that can be used:
- get
- post
- put
- patch
- delete
Syntax
res [method] <url> [params...]Examples
GET method:
res http://localhost:8000/employeesres localhost:8000/employeesres :8000/employeesres get localhost:8000/employeesPOST method:
res post localhost:8000/employees name='Steven' city='Szeged'PUT method:
res put localhost:8000/employees/1 name='Steven' city='Szeged'PATCH method:
res patch localhost:8000/employees/1 name='Steven' city='Szeged'DELETE method:
res delete localhost:8000/employees/1Authentication
Options:
--auth-type bearer
--auth token
--auth-type digest
--auth username:password
--auth-type basic
--auth username:password
Supported auth types:
- bearer
- digest
- basic
Using example:
res delete localhost:8000/employees
--auth-type bearer --auth f3a434...Short form:
res delete localhost:8000/employees
-A bearer -a f3a434...Digest auhtentication example
res localhost:8000/api/employees
--auth-type digest --auth tom:secretBasic auhtentication example
res localhost:8000/api/employees
--auth-type digest --auth tom:secret