Exemple #1
0
from __future__ import absolute_import, division, with_statement

import calendar
import email.utils
import httplib
import weakref

from tornado.escape import utf8
from tornado import httputil
from tornado.ioloop import IOLoop
from tornado.util import import_object, bytes_type, monotime

from src.logger.HoneythingLogging import HTLogging


ht = HTLogging()

class HTTPClient(object):
    """A blocking HTTP client.

    This interface is provided for convenience and testing; most applications
    that are running an IOLoop will want to use `AsyncHTTPClient` instead.
    Typical usage looks like this::

        http_client = httpclient.HTTPClient()
        try:
            response = http_client.fetch("http://www.google.com/")
            print response.body
        except httpclient.HTTPError, e:
            print "Error:", e
    """
Exemple #2
0
    def __init__(self):

        self.ht = HTLogging()
        self.cfg = ConfigReader()