The Resen a command-line HTTP client.
Simple command-line HTTP client.
GitHub:
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.
npm i -g resen
After installation, we get a res command. Check:
res --version
Methods that can be used:
- get
- post
- put
- patch
- delete
res [method] <url> [params...]
GET method:
res https://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
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...