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

Add JSON-RPC support #69

Open
1 of 2 tasks
jcubic opened this issue Jun 6, 2022 · 2 comments
Open
1 of 2 tasks

Add JSON-RPC support #69

jcubic opened this issue Jun 6, 2022 · 2 comments
Labels
enhancement New feature or request language

Comments

@jcubic
Copy link
Owner

jcubic commented Jun 6, 2022

Server echo REPL

let service = rpc "/something.php"
while true
   echo service.echo(ask "?")
end
  • Add basic of JSON-RPC 2.0
  • Add Open-RPC
@jcubic jcubic added the enhancement New feature or request label Jun 6, 2022
@jcubic
Copy link
Owner Author

jcubic commented Jun 6, 2022

Without Open-RPC the service object should be a proxy. Maybe Open-RPC is not needed at all.

@jcubic jcubic added the language label Jun 6, 2022
jcubic added a commit that referenced this issue Jun 8, 2022
@jcubic
Copy link
Owner Author

jcubic commented Jun 12, 2022

TODO: test with:

import Object

let service = rpc* "https://...."
config {"completion" => Object.keys(service)}
while true do
   let cmd = parse ask "rpc> "
   let ret = service[cmd.name](*cmd.args)
   if ret.error then
      echo "<red>" + ret.error + "</red>"
   else
      echo ret.result
   end
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request language
Projects
None yet
Development

No branches or pull requests

1 participant