我对cURL不太熟悉,因此发送此请求的结果是:
root@xyzxyz:~# curl --user 'username' --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"helloWorld","params":[]}' -H 'content-type:text/plain;' http://192.168.56.1:8442
Enter host password for user 'username':
curl: (18) transfer closed with 349 bytes remaining to read
密码本身已经输入。 我所有与之相关的投资是:
not helpful, since this is for sure not a network problem (server is running on my local machine)
答案 0 :(得分:0)
pyBitmessage是纯XML-RPC实现,而不是像Bitcoind那样的“ JSON-RPC”。因此正确的CURL语法应为:
curl --user 'username' --data-binary '<methodCall><methodName>helloWorld</methodName><params><param><value><string>hello</string></value></param><param><value><string>World</string></value></param></params></methodCall>' -H 'content-type:text/plain;' http://192.168.56.1:8442