jsonrpc4j head authentication

17 views
Skip to first unread message

Nihar ...

unread,
Jun 3, 2016, 5:54:03 AM6/3/16
to jsonrpc4j
Hi Team,

using jsonrpc4j we are able to send the request and get the response sucessfully.
request :
curl -v -H "Content-Type: application/json" -d "{\"id\":0, \"method\":\"sayHelloWorld\", \"params\":[\"John Doe\"]}" http://localhost:8080/rpc/myservice
response : 
{"jsonrpc":"2.0","id":0,"result":"Hello world, John Doe"}

now we want to add head in the same request as authentication(username/password),similar to below request

curl 
-u "jsonrpc:password@123" 
-v -H "Content-Type: application/json" -d "{\"id\":0, \"method\":\"sayHelloWorld\", \"params\":[\"John Doe\"]}" http://localhost:8080/rpc/myservice

please help us in this..provide any sample code implementation using jsonrpc4j

Regards,
Nihar
Reply all
Reply to author
Forward
0 new messages