python-hyper / hyper

HTTP/2 for Python.
http://hyper.rtfd.org/en/latest/
MIT License
1.05k stars 191 forks source link

Support generator type data #301

Closed xiongyihui closed 7 years ago

xiongyihui commented 7 years ago
  1. support generator type data

    Usage:

    from hyper import HTTPConnection
    
    def gen():
        yield 'hello'
        yield 'world'
    
    conn = HTTPConnection('http2bin.org:443')
    conn.request('POST', '/post', body=gen())
    print(conn.get_response().read())
  2. fix that data with integral multiple of the MAX_CHUNK size does not end stream.

xiongyihui commented 7 years ago

My bad. Updated. It still failed :(