Here's an example text endpoint protocol I made... (Request for Comment)
========================================== Update internal state of session etc. Is in its own protocol. Authentication is in its own protocol. But every textsite should say what its protocol is in text form in a separate index page if its protocol is well-defined.
And also, authentication also happens by text protocol. As such, there should be no cookies sent back and forth for authentication, only text. The cmd or curl-like-browser you use should be trusted by you, as should all browsers.
You will be responsible for doing the authentication flows yourself. This freedom should provide an ability to make custom authentication mechanisms for websites (what can you think of?
HTTPS will always need to be overlaid on top of these endpoints due to anonymity of conversation (no website.com/hack/the/bank/ logged on servers) and due to sensitivity of dta (authentication dta).
As such, POST requests should be used to the text endpoints, in JSON format most likely, but the format is up to you, and the website, and part of the protocol.
POST website.com/others/text via HTTPS DATA " { 'message': 'Hello', 'data':'data' } END POST
The response would be anything text based, returned all at once. Paging and finding behaviour (e.g. cd cd cd) should be part of your logic protocol. For example, display an index page of what you can ask the service. E.g.
RETURN POST
RESPONSE Hi, the website you're looking for is here. Please provide the following in JSON format to specify your query: service: "weather" || others...
END RESPONSE
In this way a programmer can adapt his request to suit the needs of the service. E.g. how many of you remember how to actually use google to google things from the command line?
More information on your service may be displayed by simply querying /text/help endpoint. This should be a text endpoint which is self explanatory, and should explain how to use the two endpoints hereonin provided: /text/help /text
The intitial request to /text/help should be assumed to be blank, and /text/help can then provide information n how to use itself and /text/
=============================================
Would be int4erested what you think...