-
Notifications
You must be signed in to change notification settings - Fork 21k
Description
The RC12 JSON RPC server (ethereum -rpc=true) seems to return invalid status code (blank) no matter what I throw at it:
Using OSX latest, Python 3.4+requests+json-rpc transport confirmed to work on google.com URLs + confirmed to work with 3rd party RPC servers installed locally, etc:
import requests
import json
def main():
url = "http://127.0.0.1:8080"
response = requests.get(url)
print(response)
if __name__ == "__main__":
main()
Returns:
requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=8080): Max retries exceeded with url: / (Caused by <class 'http.client.BadStatusLine'>: '')
Tried all sorts of combinations such as:
url = "http://127.0.0.1:8080"
headers = {'content-type': 'application/json'} # TODO: might not be required
payload = {
"method": "EthereumAPI.GetKey",
"jsonrpc": "2.0"
}
response = requests.post(url, data=json.dumps(payload), headers=headers).json()
print(response)
... to no avail. Since this work with other RPC servers I suspect this is related to go ethereum
Update: just to confirm, the requests are making their way through because ethereum spits out "2014/06/15 19:57:24 [JSON] Incoming request." whenever I call it, with no further comments