resen
v0.10.2
Published
Command-line HTTP client
Downloads
6
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 resen
After installation, we get a res command. Check:
res --version
Using
Methods that can be used:
- get
- post
- put
- patch
- delete
Syntax
res [method] <url> [params...]
Examples
GET method:
res http://localhost:8000/employees
res localhost:8000/employees
res get localhost:8000/employees
POST 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/1
Authentication
Options:
- --auth-type bearer
- --auth token
Currently, only the Bearer token is supported.
Using example:
res delete localhost:8000/employees
--auth-type bearer --auth f3a434...
Short form:
res delete localhost:8000/employees
-A bearer -a f3a434...