Perform HTTP & WS requests like a boss! A command line utility that supports HTTP, HTTPS, Websocket and server creation, featuring a cool interactive shell. Ideal for testing and debugging.
npm install http-requesterPerform HTTP & WS requests like a boss!
A command line utility that supports HTTP, HTTPS, Websocket and server creation.
It features a cool interactive shell.
Ideal for testing and debugging.
* License: MIT
* Current status: beta
Do not forget to install it globally:
```
npm install -g http-requester
* HTTP, HTTPS and Websocket requests
* Dummy HTTP and Websocket server creation
* A cool interactive shell with history and auto-completion (even headers)
* An interactive Websocket Chatter
* Without any argument, it runs the interactive shell
* --help, -h: display help
--shell: run requests in an interactive shell, like a boss!*
* --method
* --protocol http|https|ws: set the protocol, 'http', 'https' or 'ws'
* --host
* --port
* --path
* --url
--headers.
If it is not conflicting with another options, it can be used without prefix,
like --content-type application/json
* --headers
* --auth "
* --timeout
* --output
* --http: shortcut for --protocol http
* --https: shortcut for --protocol https
* --ws: shortcut for --protocol ws
* --beautify, -b: beautify JSON body
* --server: start a server
* --config
Syntactic sugar:
* http-requester launch the interactive shell, like http-requester --shellhttp-requester
* load a config file, like http-requester --config http-requester
* GET the url, like http-requester --method get --url http-requester
* request the url, like http-requester --method
show or* s
List the details of the request about to be performed.
request or* req
Perform the request.
* <protocol>://<host>[:<port>][/<path>]
Parse the full URL and set the protocol, host, port and path.
E.g.: > http://localhost:8080/blog/index.html
* host <hostname>[:<port>]
Set the host and port to connect to.
E.g.: > host localhost:8080
* port <port>
Set the port to connect to.
* protocol http|https|ws
Set the protocol to use.
* method <HTTP method>
Set the HTTP method.
* cd <path>
Modify the path just like the shell 'cd' command does.
Start the path with a '/' to set the absolute path, otherwise it moves relative to the current path.
It does NOT modify the query-string part of the URL.
E.g.: > cd blog , > cd .. , > cd ../../blog/index.html , > cd /index.html , ...
* ? <query string>
Set the query string part of the URL.
Use a single ? alone to erase the query string.
E.g.: > ? , > ?key=value , > ?key1=value1&key2=value2 , ...
* headers.<header> <value>
Set a HTTP header.
E.g.: > headers.Content-type: text/html
* <header>: <value>
The shortest way to set a HTTP header.
E.g.: > Content-type: text/html`
* auth <user>:<password>
Basic authentication to compute an Authorization header.
* body <body string>
Set the body of the request.
* body
Set the body of the request, using the multi-line mode.
* timeout <ms>
Set the request timeout in ms.
* clear [headers|auth|body]
Clear headers, auth or body, without argument: clear both.
* autoclear [headers|auth|body]
Autoclear headers, auth or body after each request, without argument: just check.
* autocookie
Turn autocookie on/off.
* beautify
Turn beautify on/off for JSON body.
* ls
List all known sub-resources of the current path, just like the UNIX 'ls' command does.