I'm looking for something that acts like a terminal but lets me have a "dialogue" with a server over http. Something like this :
$ connect http://myserver.com
Welcome to myserver.com
Options
A - Fribble the obsticator
B - List Frogits
C - Show the log
Q - Quit
$ A
Obsticator fribbled
blah blah
blah
$ C
Log file
...
$ Q
Bye
I'm not looking for anything clever that tunnels an actual unix command-line over http. Nor a text-mode browser. This will talk to a simple custom server that knows its being accessed this way and that will return plain-text, not html.
But it must be over http, not a different protocol. And I don't want to be doing curl-like commands like
$ curl http://myserver.com?opt=A
It should be able to capture the URL once. And turning the command into a CGI argument should be transparent to the user.
Update: Also, I'm not bothered about keeping this dialogue open within a single connection, each command sent and received can be a separate http request. (In fact, that's better as it allows the server to be simpler)
Update 2 : The reason I want this is that I want to build a simple, small web-service API using Python Hug ( http://www.hug.rest/ ) but it would be convenient to have access to a couple of its actions directly from the command-line rather than the browser.
Rather than adding the extra complexity, of talking a different protocol and managing a separate interaction listener, on the server, it would be good to have a simple command-line client to talk to the API with standard http requests.
So, is there anything like this? (Before I sit down and write one.)
ncat
to connect to the port but, even then, you'd need to type in full HTTP requests and, in most cases, the connection will be closed before you even get one request off.GET /?opt=A HTTP/1.0
and server doesn't close connection , go for it.