from pycoin.version import version

try:
    import urllib2 as request
    from urllib import urlencode  # noqa
except ImportError:
    from urllib import request
    from urllib.parse import urlencode  # noqa


PYCOIN_AGENT = 'pycoin/%s' % version


def urlopen(url):
    req = request.Request(url)
    req.add_header('User-agent', PYCOIN_AGENT)
    return request.urlopen(req)

@@ -259,16 +259,27 @@
 open(url
+, data=None
 ):%0A    r
@@ -302,16 +302,27 @@
 uest(url
+, data=data
 )%0A    re

Fix https://github.com/richardkiss/pycoin/issues/248