rask  Check-in [cd899b3cf1]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
SHA1 Hash:cd899b3cf135b9b9e5403ba1e9a3a5aceda844c7
Date: 2017-04-01 19:34:17
User: umgeher
Comment:importing http stuff from rash.http
Tags And Properties
  • branch=rask/f/httpclient inherited from [7587e03116]
  • sym-rask/f/httpclient inherited from [7587e03116]
Context
2017-04-01
19:37
[2c2c5d3114] better name (user: umgeher, tags: rask/f/httpclient)
19:34
[cd899b3cf1] importing http stuff from rash.http (user: umgeher, tags: rask/f/httpclient)
19:31
[bb7f86a437] application imported (user: umgeher, tags: rask/f/httpclient)
Changes

Changes to rask/rask/main/__init__.py.

1

2
3
4
5
6
7
8
9
10
11
12
13
..
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
from rask.base import Base

from rask.options import define,options,parse_command_line
from rask.parser.json import dictfy
from rask.parser.utcode import UTCode
from tornado.httpclient import AsyncHTTPClient,HTTPRequest
from tornado.web import Application

__all__ = ['Main']

class Main(Base):
    __http__ = None
    __http_routes__ = []
    __options__ = {
................................................................................
        try:
            assert self.__http_client
        except (AssertionError,AttributeError):
            self.__http_client = AsyncHTTPClient()
        except:
            raise
        return self.__http_client.fetch

    @property
    def http_request(self):
        return HTTPRequest(
            allow_nonstandard_methods=True,
            request_timeout=20,
            url='http://localhost',
            validate_cert=False
        )
    
    @property
    def services(self):
        try:
            assert self.__services
        except (AssertionError,AttributeError):
            self.__services = {}

>



<
<







 







<
<
<
<
<
<
<
<
<







1
2
3
4
5


6
7
8
9
10
11
12
..
32
33
34
35
36
37
38









39
40
41
42
43
44
45
from rask.base import Base
from rask.http import Application,AsyncHTTPClient,HTTPRequest
from rask.options import define,options,parse_command_line
from rask.parser.json import dictfy
from rask.parser.utcode import UTCode



__all__ = ['Main']

class Main(Base):
    __http__ = None
    __http_routes__ = []
    __options__ = {
................................................................................
        try:
            assert self.__http_client
        except (AssertionError,AttributeError):
            self.__http_client = AsyncHTTPClient()
        except:
            raise
        return self.__http_client.fetch









    
    @property
    def services(self):
        try:
            assert self.__services
        except (AssertionError,AttributeError):
            self.__services = {}