Bitcoin Forum
October 20, 2018, 11:01:07 PM *
News: Make sure you are not using versions of Bitcoin Core other than 0.17.0 [Torrent], 0.16.3, 0.15.2, or 0.14.3. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: curl returns empty output when json-rpc  (Read 210 times)
Atae
Newbie
*
Offline Offline

Activity: 16
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:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!