Netcat is generally known as a TCP/IP Swiss Army Knife and is incredibly helpful for both debugging and mocking up network services
Following is an example on how to setup a mock RESTful service that communicates over HTTPS.
On the “server” side, run the following command. The -l command instructs Netcat to listen.
while true; do { echo -e “HTTP/1.1 200 OK\r\n$(date)\r\n\r\n<h1>hello world from $(hostname) on $(date)</h1>” | nc -vl –ssl 8080; } done
On the “client” side, run the → Continue reading “Mocking an HTTPS RESTful endpoint with Netcat”