rask  Check-in [3f6e8ad707]

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

Overview
SHA1 Hash:3f6e8ad707d82bd4ab2d65efdfb1a9a0fcfa7dcf
Date: 2017-04-01 19:29:11
User: umgeher
Comment:http client and request
Tags And Properties
  • branch=rask/f/httpclient inherited from [7587e03116]
  • sym-rask/f/httpclient inherited from [7587e03116]
Context
2017-04-01
19:31
[bb7f86a437] application imported (user: umgeher, tags: rask/f/httpclient)
19:29
[3f6e8ad707] http client and request (user: umgeher, tags: rask/f/httpclient)
19:16
[7587e03116] Create new branch named "rask/f/httpclient" (user: umgeher, tags: rask/f/httpclient)
Changes

Changes to rask/rask/http/__init__.py.


1
2
3
4
5
6

7

8
9
10
11
12
13
14
15
16
17

from rask.base import Base
from tornado.web import asynchronous,RequestHandler
from tornado.websocket import WebSocketHandler

__all__ = [
    'asynchronous'

    'Handler',

    'WSHandler'
]

class Handler(RequestHandler,Base):
    def set_default_headers(self):
        self.set_header('Server','Viking Makt HTTP Server')

class WSHandler(WebSocketHandler,Base):
    def check_origin(self,origin):
        return True
>






>

>






|



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from client import AsyncHTTPClient,HTTPRequest
from rask.base import Base
from tornado.web import asynchronous,RequestHandler
from tornado.websocket import WebSocketHandler

__all__ = [
    'asynchronous'
    'AsyncHTTPClient',
    'Handler',
    'HTTPRequest',
    'WSHandler'
]

class Handler(RequestHandler,Base):
    def set_default_headers(self):
        self.set_header('Server','Viking Makt HTTP Server')
        
class WSHandler(WebSocketHandler,Base):
    def check_origin(self,origin):
        return True

Added rask/rask/http/client.py.































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from tornado.httpclient import AsyncHTTPClient as HTTPClient,HTTPRequest as _HTTPRequest

__all__ = [
    'AsyncHTTPClient',
    'HTTPRequest',
]

def HTTPRequest(*kwargs):
    return _HTTPRequest(
        allow_nonstandard_methods=True,
        request_timeout=20,
        url='http://localhost',
        validate_cert=False
        **kwargs
    )