Open pocke opened 8 years ago
Do you mean JSON-RPC via HTTP?
No, I'd like to remove RPC, and introduce HTTP API such as REST.
I was thinking to use curl
instead of lemonade client by this change. https://twitter.com/p_ck_/status/790797713348583424
But I'm not sure it is the best design.
I want client like this.
#content with urlEncode
curl http://127.0.0.1:2489/copy?content=%e6%88%91%e6%98%af%e7%b2%98%e8%b4%b4%e6%9d%bf&line-ending=CRLF
curl http://127.0.0.1:2489/paste?line-ending=CRLF
#url with urlEncode
curl http://127.0.0.1:2489/open?url=https%3a%2f%2fgithub.com%2flemonade-command%2flemonade
Only use HTTP GET. also can use nc
command to send HTTP GET request.
I prefer use POST for copy.
I agree use POST. that rest.
curl -X POST --data "this is raw data" http://127.0.0.1:2489/copy?line-ending=CRLF
I test server REST API use curl is ok, I'll write a client.
https://github.com/hanxi/lemonade/commit/cee32d58855d3db03bda0f8d68402bf549699aad
I release this feature in https://github.com/hanxi/lemonade/releases/tag/v2.0.0-pre
Do you mean JSON-RPC via HTTP?