Did I find the right examples for you? yes no

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)
Utility function that compresses the request and add the user agent header
if supplied.

Wrapper of :func:`url_open` which reads the full response

:param str url: url to request
:param str data: data to add to the request
:param bool compress: if the response should be compressed
:param str agent: if supplied, the 'User-Agent' header we'll be added to
    the request(more...)

        def url_read(url, data=None, compress=True, agent=None):
    """
    Utility function that compresses the request and add the user agent header
    if supplied.

    Wrapper of :func:`url_open` which reads the full response

    :param str url: url to request
    :param str data: data to add to the request
    :param bool compress: if the response should be compressed
    :param str agent: if supplied, the 'User-Agent' header we'll be added to
        the request
    :return: the response data
    """
    return url_open(url, data, compress, agent).read()
        


src/m/g/mgkit-0.1.11/mgkit/net/__init__.py   mgkit(Download)
"""
Package with functions/classes used in accessing network resources
"""
from .utils import url_read, url_open