Bitcoin Forum
May 06, 2024, 03:46:40 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: curl returns empty output when json-rpc  (Read 330 times)
Atae (OP)
Newbie
*
Offline Offline

Activity: 15
Merit: 0


View Profile
November 17, 2017, 12:00:06 AM
 #1

I am not able to get JSON-RPC response via curl. It seems like is not accepting requests.

My bitcoin.conf
Code:
rpcuser=User123
rpcpassword=456Password
masternode=1
server=1
rpcport=9920
rpcconnect=127.0.0.1


Testing curl

Code:
curl  http://User123:456Password@127.0.0.1:9920/
JSONRPC server handles only POST requests

The output is always empty, doesn't matter if I add data or user,password. Is always empty:

Code:
C:\Users\admin\Desktop\BatchForLineNotify\Batch>curl http://User123:456Password@127.0.0.1:9920 -H 'content-type:text/plain;' --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getinfo","params":[]}'

C:\Users\admin\Desktop\BatchForLineNotify\Batch>

C:\Users\admin\Desktop\BatchForLineNotify\Batch>curl --user User123:456Password http://localhost:9920 -H 'content-type:text/plain;' --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getinfo","params":[]}'

C:\Users\admin\Desktop\BatchForLineNotify\Batch>

C:\Users\admin\Desktop\BatchForLineNotify\Batch>curl --user User123:456Password --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9920
curl: (6) Could not resolve host: 1.0,
curl: (3) Illegal port number
curl: (6) Could not resolve host: method
curl: (6) Could not resolve host: getinfo,
curl: (6) Could not resolve host: params
curl: (3) [globbing] bad range specification in column 2
curl: (3) [globbing] unmatched close brace/bracket in column 1
curl: (6) Could not resolve host: text

C:\Users\admin\Desktop\BatchForLineNotify\Batch>

Any ideas why is this happening? Don't know what else to try.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!