Closed namuyan closed 7 years ago
I setup electrum-server. And I request by CURL. curl -v -d '{"method":"blockchain.address.get_balance","params":["FfyuqhVShQ2FqAVCBbNBspLVdVMjxiS1dE"],"id":1}' http://127.0.0.1:22001
curl -v -d '{"method":"blockchain.address.get_balance","params":["FfyuqhVShQ2FqAVCBbNBspLVdVMjxiS1dE"],"id":1}' http://127.0.0.1:22001
I get respose, but something wrong. I add par to https://github.com/spesmilo/electrum-server/blob/master/src/stratum_tcp.py#L132 to get raw parameter.
Trying 127.0.0.1... Connected to 127.0.1 (127.0.0.1) port 22001 (#0) POST / HTTP/1.1 Host: 127.0.1:22001 User-Agent: curl/7.45.0 Accept: / Content-Length: 98 Content-Type: application/x-www-form-urlencoded upload completely sent off: 98 out of 98 bytes {"par": "POST / HTTP/1.1", "error": "bad JSON"} {"par": "Host: 127.0.1:22001", "error": "bad JSON"} {"par": "User-Agent: curl/7.45.0", "error": "bad JSON"} {"par": "Accept: /", "error": "bad JSON"} {"par": "Content-Length: 98", "error": "bad JSON"} {"par": "Content-Type: application/x-www-form-urlencoded", "error": "bad JSON"}
Trying 127.0.0.1... Connected to 127.0.1 (127.0.0.1) port 22001 (#0) POST / HTTP/1.1 Host: 127.0.1:22001 User-Agent: curl/7.45.0 Accept: / Content-Length: 98 Content-Type: application/x-www-form-urlencoded
upload completely sent off: 98 out of 98 bytes {"par": "POST / HTTP/1.1", "error": "bad JSON"} {"par": "Host: 127.0.1:22001", "error": "bad JSON"} {"par": "User-Agent: curl/7.45.0", "error": "bad JSON"} {"par": "Accept: /", "error": "bad JSON"} {"par": "Content-Length: 98", "error": "bad JSON"} {"par": "Content-Type: application/x-www-form-urlencoded", "error": "bad JSON"}
/etc/electrum.conf is electrum_rpc_port = 8000 stratum_tcp_port = 22001
electrum_rpc_port = 8000 stratum_tcp_port = 22001
What is wrong?
Got the same problem. Do you remember how it got solved?
I setup electrum-server. And I request by CURL.
curl -v -d '{"method":"blockchain.address.get_balance","params":["FfyuqhVShQ2FqAVCBbNBspLVdVMjxiS1dE"],"id":1}' http://127.0.0.1:22001
I get respose, but something wrong. I add par to https://github.com/spesmilo/electrum-server/blob/master/src/stratum_tcp.py#L132 to get raw parameter.
/etc/electrum.conf is
electrum_rpc_port = 8000 stratum_tcp_port = 22001
What is wrong?