Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_framework/authproxy.py
Show All 30 Lines | |||||
- sends proper, incrementing 'id' | - sends proper, incrementing 'id' | ||||
- sends Basic HTTP authentication headers | - sends Basic HTTP authentication headers | ||||
- parses all JSON numbers that look like floats as Decimal | - parses all JSON numbers that look like floats as Decimal | ||||
- uses standard Python json lib | - uses standard Python json lib | ||||
""" | """ | ||||
import base64 | import base64 | ||||
import decimal | import decimal | ||||
from http import HTTPStatus | |||||
import http.client | import http.client | ||||
import json | import json | ||||
import logging | import logging | ||||
import os | import os | ||||
import socket | import socket | ||||
import time | import time | ||||
import urllib.parse | import urllib.parse | ||||
from http import HTTPStatus | |||||
HTTP_TIMEOUT = 30 | HTTP_TIMEOUT = 30 | ||||
USER_AGENT = "AuthServiceProxy/0.1" | USER_AGENT = "AuthServiceProxy/0.1" | ||||
log = logging.getLogger("BitcoinRPC") | log = logging.getLogger("BitcoinRPC") | ||||
class JSONRPCException(Exception): | class JSONRPCException(Exception): | ||||
▲ Show 20 Lines • Show All 177 Lines • Show Last 20 Lines |