Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(12)  |  Call(9)  |  Derive(0)  |  Import(3)

src/g/r/gruvi-0.9.2/examples/curl.py   gruvi(Download)
import logging
import argparse
from gruvi.http import HttpClient, geturlinfo
 
logging.basicConfig()
args = parser.parse_args()
 
client = HttpClient()
host, port, ssl, path = geturlinfo(args.url)
client.connect((host, port), ssl=ssl)

src/g/r/gruvi-HEAD/examples/curl.py   gruvi(Download)
 
url = http.urlsplit2(args.url)
client = http.HttpClient()
client.connect((url.hostname, url.port), ssl=url.scheme == 'https')
 

src/b/l/bluepass-HEAD/bluepass/syncapi.py   bluepass(Download)
import gruvi
from gruvi import Fiber, compat
from gruvi.http import HttpServer, HttpClient
 
from bluepass import _version, json, base64, uuid4, util, logging
            sslargs = {'dhparams': base64.decode(dhparams['skip2048']),
                       'ciphers': 'ADH+AES'}
        connection = HttpClient()
        try:
            connection.connect(address, ssl=True, **sslargs)

src/g/r/gruvi-0.9.2/tests/test_http.py   gruvi(Download)
import time
import gruvi
from gruvi.http import HttpParser, HttpMessage, HttpServer, HttpClient
from support import *
 
    def test_simple(self):
        server = HttpServer(hello_app)
        server.listen(('localhost', 0))
        port = server.transport.getsockname()[1]
        client = HttpClient()
    def test_request_headers_not_changed(self):
        server = HttpServer(hello_app)
        server.listen(('localhost', 0))
        addr = gruvi.getsockname(server.transport)
        client = HttpClient()
    def test_request_body_bytes(self):
        server = HttpServer(echo_app)
        server.listen(('localhost', 0))
        addr = gruvi.getsockname(server.transport)
        client = HttpClient()
    def test_request_body_string(self):
        server = HttpServer(echo_app)
        server.listen(('localhost', 0))
        addr = gruvi.getsockname(server.transport)
        client = HttpClient()