MCPcopy
hub / github.com/HelloZeroNet/ZeroNet / make_request

Function make_request

src/lib/pybitcointools/bci.py:12–23  ·  view source on GitHub ↗
(*args)

Source from the content-addressed store, hash-verified

10
11# Makes a request to a given URL (first arg) and optional params (second arg)
12def make_request(*args):
13 opener = build_opener()
14 opener.addheaders = [('User-agent',
15 'Mozilla/5.0'+str(random.randrange(1000000)))]
16 try:
17 return opener.open(*args).read().strip()
18 except Exception as e:
19 try:
20 p = e.read().strip()
21 except:
22 p = e
23 raise Exception(p)
24
25
26def is_testnet(inp):

Callers 15

is_testnetFunction · 0.85
bci_unspentFunction · 0.85
blockr_unspentFunction · 0.85
helloblock_unspentFunction · 0.85
historyFunction · 0.85
bci_pushtxFunction · 0.85
eligius_pushtxFunction · 0.85
blockr_pushtxFunction · 0.85
helloblock_pushtxFunction · 0.85
last_block_heightFunction · 0.85
bci_fetchtxFunction · 0.85
blockr_fetchtxFunction · 0.85

Calls 2

openMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected