How can we call a json RPC 2.0 using Postman along with ,Is there any library for java to call JSON RPC

3,656 views
Skip to first unread message

Barun Vishwakarma

unread,
Jun 18, 2020, 8:54:48 AM6/18/20
to JSON-RPC
How can we call a json RPC 2.0 using Postman along with ,Is there any library for java to call JSON RPC.

Please help me with that.

Pascal Charbonneau

unread,
Jun 18, 2020, 9:52:00 AM6/18/20
to json...@googlegroups.com
JSON RPC endpoints are simple POST so you should be able to do that with Postman.

Just make sure you set your content-type to be 'application/json' and set your POST body accordingly.

{
  "jsonrpc" : "2.0",
  "method" : "GetAllYourRiches",
  "params" : [],
  "id": 1
}

I personally prefer the Advanced Rest Client for its simplicity and beautiful interface.
I have not done java for 15 years, so can't help with that bit.

On Thu, Jun 18, 2020 at 8:54 AM Barun Vishwakarma <barunvishw...@gmail.com> wrote:
How can we call a json RPC 2.0 using Postman along with ,Is there any library for java to call JSON RPC.

Please help me with that.

--
You received this message because you are subscribed to the Google Groups "JSON-RPC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to json-rpc+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/json-rpc/52edd399-944f-42a7-8483-527c6e0c6501n%40googlegroups.com.

Aigerim Iskakova

unread,
Jun 19, 2020, 4:05:24 AM6/19/20
to json...@googlegroups.com
Dear All,

I have urgent question regarding calling jsonrpc. In the react app I would like to use client simple jsonrpc js library to call from the http server. I don't know the syntax. I would like to use the response text in method of the App.class. What can you suggest me? It is extremely important and urgent. Thank you in advance?

чт, 18 июн. 2020 г., 19:52 Pascal Charbonneau <pchar...@gmail.com>:

Pascal Charbonneau

unread,
Jun 19, 2020, 5:08:17 AM6/19/20
to json...@googlegroups.com
I suggest reading the JSOn-RPC 2.0 specification first which explains the structure of the messages. You can use any HTTP javascript library like Axios to do the POST yourself and get the response or you can use a more specialized library like Simple-jsonrpc-js or Json-rpc. You just need to know the methods and their parameters as well as the expected responses that are available to you on the server side.

Hope this helps.

Pascal

Aigerim Iskakova

unread,
Jun 20, 2020, 11:06:07 AM6/20/20
to json...@googlegroups.com
Thank you! I've got it!



--
Sincerely,

--------------------------------------

Aigerim Iskakova

4 year undergraduate student

Electrical and Computer Engineering

School of Engineering

Nazarbayev University

53 Kabanbay Batyr Ave, Astana

Republic of Kazakhstan, 010000

Phone: +7 771 369 37 69 

Mail:  aigerim....@nu.edu.kz


welfor...@gmail.com

unread,
Oct 21, 2020, 8:25:05 AM10/21/20
to JSON-RPC
Just to confirm,

JSON-RPC 1.0 or 2.0 does not have to be sent via any specific method if you're using an HTTP server to handle your requests then you can just use HTTP POST or PUT, if you're using WebSockets you would need to use a WebSocket Tester something like https://chrome.google.com/webstore/detail/simple-websocket-client/pfdhoblngboilpfeibdedpjgfnlcodoo?hl=en,

If your using another custom server method you could use a Telnet client if not encrypted if encrypted you will have to build your own client that works with the server.

Arne Blankerts

unread,
Oct 21, 2020, 8:32:42 AM10/21/20
to json...@googlegroups.com
Hi,

On Wed, 2020-10-21 at 05:25 -0700, welfor...@gmail.com wrote:

> If your using another custom server method you could use a Telnet
> client if not encrypted if encrypted you will have to build your own
> client that works with the server.

Just for the record: No you don't, you use openSSL, e.g. like this:

openssl s_client -crlf -connect <server>:<port>

Just like you'd use telnet.. :)


Regards,
Arne

--
Arne Blankerts <ar...@blankerts.de>
GnuPG Key: 0xEA2EBCDC

welfor...@gmail.com

unread,
Oct 21, 2020, 9:46:26 AM10/21/20
to JSON-RPC
If your using an OpenSSL Encrypted server, you could be using another such as libsodium 

Arne Blankerts

unread,
Oct 21, 2020, 9:50:58 AM10/21/20
to json...@googlegroups.com
On Wed, 2020-10-21 at 06:46 -0700, welfor...@gmail.com wrote:
> If your using an OpenSSL Encrypted server, you could be using another
> such as libsodium

This is getting a bit off-topic, but afaik libsodium is, as the name
suggest, a library and not a CLI client.

I was merely suggesting that if you have a TLS enabled endpoint that is
not speaking HTTP, you could use openssl's telnet-emulation via CLI
rather than writing your own client.
Reply all
Reply to author
Forward
0 new messages