bitcoin.conf configuration file.
prune=600 maxconnections=12 maxuploadtarget=20 rpcconnect=127.0.0.1 rpcusr=myusertest rpcpassword=passwrod99555 deamon=1 keypool=10000 rpcport=8332 testnet=1 server=1 # tells Bitcoin-QT to accept JSON-RPC commands.
request using bitcoin-cli
user@server[/home/user/bitcoin/bitcoin-0.16.0/bin]# ./bitcoin-cli -getinfo { "version": 160000, "protocolversion": 70015, "walletversion": 159900, "balance": 0.00000000, "blocks": 1289390, "timeoffset": 0, "connections": 1, "proxy": "", "difficulty": 1, "testnet": true, "keypoololdest": 1523395336, "keypoolsize": 10000, "paytxfee": 0.00000000, "relayfee": 0.00001000, "warnings": "" }
request using curl
`root@server [/home/user/bitcoin/bitcoin-0.16.0/bin]# curl --user myusertest --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ --verbose Enter host password for user 'myusertest':
- About to connect() to 127.0.0.1 port 8332 (#0)
- Trying 127.0.0.1... connected
- Connected to 127.0.0.1 (127.0.0.1) port 8332 (#0)
- Server auth using Basic with user 'myusertest'
POST / HTTP/1.1 Authorization: Basic Yml0Y29yZWFwdXNyOhtPQVJMSnZtR0dFd254dlduZEJmZ3NWekxwbTZFUzI5aGNKVWI= User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.27.1 zlib/1.2.3 libidn/1.18 libssh2/1.4.2 Host: 127.0.0.1:8332 Accept: / content-type: text/plain; Content-Length: 71
< HTTP/1.1 401 Unauthorized
- Authentication problem. Ignoring this. < WWW-Authenticate: Basic realm="jsonrpc" < Date: Thu, 12 Apr 2018 00:44:02 GMT < Content-Length: 0 < Content-Type: text/html; charset=ISO-8859-1 <
- Connection #0 to host 127.0.0.1 left intact
- Closing connection #0`
what is the reazon by which using curl generates error 401?

