Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use HTTP instead of TCP and Go RPC #21

Open
pocke opened this issue Oct 25, 2016 · 10 comments
Open

Use HTTP instead of TCP and Go RPC #21

pocke opened this issue Oct 25, 2016 · 10 comments

Comments

@pocke
Copy link
Member

pocke commented Oct 25, 2016

No description provided.

@mattn
Copy link
Member

mattn commented Dec 13, 2018

Do you mean JSON-RPC via HTTP?

@pocke
Copy link
Member Author

pocke commented Dec 13, 2018

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.

@hanxi
Copy link

hanxi commented May 13, 2019

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

@hanxi
Copy link

hanxi commented May 13, 2019

Only use HTTP GET. also can use nc command to send HTTP GET request.

@mattn
Copy link
Member

mattn commented May 13, 2019

I prefer use POST for copy.

@hanxi
Copy link

hanxi commented May 13, 2019

I agree use POST. that rest.

@hanxi
Copy link

hanxi commented May 13, 2019

curl -X POST --data "this is raw data" http://127.0.0.1:2489/copy?line-ending=CRLF

@hanxi
Copy link

hanxi commented May 13, 2019

I test server REST API use curl is ok, I'll write a client.

hanxi@cee32d5

@hanxi
Copy link

hanxi commented May 15, 2019

@zhoupro
Copy link

zhoupro commented Sep 18, 2022

At the start, I want to use it for a while. quit last. Becase so simple, I rewrite one in roperate。 And add get host clip image。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants