0.13.22 • Published 4 years ago

http-requester v0.13.22

Weekly downloads
7
License
MIT
Repository
github
Last release
4 years ago

HTTP Requester

Perform 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

Install

Do not forget to install it globally:

npm install -g http-requester

Feature highlights:

  • 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

“Like a boss? Screenshot please!”

Screenshot

Available command line options:

  • Without any argument, it runs the interactive shell
  • --help, -h: display help
  • --shell: run requests in an interactive shell, like a boss!
  • --method : set the HTTP method
  • --protocol http|https|ws: set the protocol, 'http', 'https' or 'ws'
  • --host : set the targeted host
  • --port , -p : set the targeted port, default is 80 (HTTP) or 443 (HTTPS)
  • --path : set the path of the targeted resource in the host
  • --url : the full URL of the resource, will be splitted into protocol, host, port and path
  • --headers.* : any header can be specified as an option, e.g. --headers.content-type application/json. If it is not conflicting with another options, it can be used without prefix, like --content-type application/json
  • --headers : specify all headers using the JSON format
  • --auth ":": basic authentication i.e. "user:password" to compute an Authorization header
  • --timeout : set the request timeout in ms
  • --output , -o : if given, the body's response will be written to this file instead of STDOUT
  • --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 : a JSON file containing all the above options, structured in an object

Syntactic sugar:

  • http-requester launch the interactive shell, like http-requester --shell
  • http-requester <file> load a config file, like http-requester --config <file>
  • http-requester <url> GET the url, like http-requester --method get --url <url>
  • http-requester <method> <url> request the url, like http-requester --method <method> --url <url>

Available interactive shell commands:

  • show or s

    	List the details of the request about to be performed.
  • request or req

    	Perform the request.
  • <protocol>://<host>:<port>

    	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.
0.13.22

4 years ago

0.13.21

4 years ago

0.13.20

4 years ago

0.13.19

4 years ago

0.13.18

4 years ago

0.13.17

4 years ago

0.13.16

4 years ago

0.13.15

5 years ago

0.13.14

5 years ago

0.13.13

5 years ago

0.13.12

5 years ago

0.13.11

5 years ago

0.13.10

5 years ago

0.13.9

5 years ago

0.13.8

5 years ago

0.13.7

5 years ago

0.13.6

5 years ago

0.13.5

5 years ago

0.13.4

5 years ago

0.13.3

5 years ago

0.13.2

5 years ago

0.13.1

5 years ago

0.13.0

5 years ago

0.12.14

5 years ago

0.12.13

5 years ago

0.12.12

5 years ago

0.12.11

6 years ago

0.12.10

6 years ago

0.12.9

6 years ago

0.12.8

6 years ago

0.12.7

6 years ago

0.12.6

6 years ago

0.12.5

7 years ago

0.12.4

7 years ago

0.12.3

7 years ago

0.12.2

7 years ago

0.12.1

7 years ago

0.12.0

7 years ago

0.11.7

8 years ago

0.11.6

8 years ago

0.11.5

8 years ago

0.11.4

8 years ago

0.11.3

8 years ago

0.11.2

8 years ago

0.11.1

8 years ago

0.11.0

8 years ago

0.10.3

8 years ago

0.10.2

8 years ago

0.10.1

8 years ago

0.10.0

8 years ago

0.9.1

8 years ago

0.9.0

8 years ago

0.8.5

8 years ago

0.8.4

8 years ago

0.8.3

9 years ago

0.8.2

9 years ago

0.8.1

9 years ago

0.8.0

9 years ago

0.7.4

9 years ago

0.7.3

9 years ago

0.7.2

9 years ago

0.7.1

9 years ago

0.7.0

9 years ago

0.6.2

9 years ago

0.6.1

9 years ago

0.6.0

9 years ago

0.5.1

9 years ago

0.5.0

9 years ago

0.4.26

9 years ago

0.4.25

9 years ago

0.4.24

9 years ago

0.4.23

9 years ago

0.4.22

9 years ago

0.4.21

9 years ago

0.4.20

9 years ago

0.4.19

9 years ago

0.4.18

9 years ago

0.4.17

9 years ago

0.4.16

9 years ago

0.4.15

9 years ago

0.4.14

9 years ago

0.4.13

9 years ago

0.4.12

9 years ago

0.4.11

9 years ago

0.4.10

9 years ago

0.4.9

9 years ago

0.4.8

9 years ago

0.4.7

9 years ago

0.4.6

9 years ago

0.4.5

9 years ago

0.4.4

9 years ago

0.4.3

9 years ago

0.4.2

9 years ago

0.4.1

9 years ago

0.4.0

9 years ago

0.3.1

9 years ago

0.3.0

9 years ago

0.2.15

9 years ago

0.2.14

9 years ago

0.2.13

9 years ago

0.2.12

9 years ago

0.2.11

9 years ago

0.2.10

9 years ago

0.2.9

9 years ago

0.2.8

9 years ago

0.2.7

9 years ago

0.2.6

9 years ago

0.2.5

9 years ago

0.2.4

9 years ago

0.2.3

9 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.0

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago