@@ -238,8 +238,8 @@ And then we can send requests:
238
238
client = MyHttpClient(" httpbin.org" , 443 )
239
239
240
240
client.send(h11.Request(method = " GET" , target = " /xml" ,
241
- headers = [(" Host" , " httpbin.org" )]),
242
- h11.EndOfMessage())
241
+ headers = [(" Host" , " httpbin.org" )]))
242
+ client.send( h11.EndOfMessage())
243
243
244
244
And read back the events:
245
245
@@ -321,8 +321,8 @@ allowing us to send another :class:`Request`:
321
321
client.conn.our_state, client.conn.their_state
322
322
323
323
client.send(h11.Request(method = " GET" , target = " /get" ,
324
- headers = [(" Host" , " httpbin.org" )]),
325
- h11.EndOfMessage())
324
+ headers = [(" Host" , " httpbin.org" )]))
325
+ client.send( h11.EndOfMessage())
326
326
client.next_event()
327
327
328
328
@@ -339,9 +339,9 @@ Here's some ideas of things you might try:
339
339
340
340
client.send(h11.Request(method = " POST" , target = " /post" ,
341
341
headers = [(" Host" , " httpbin.org" ),
342
- (" Content-Length" , " 10" )]),
343
- h11.Data(data = b " 1234567890" ),
344
- h11.EndOfMessage())
342
+ (" Content-Length" , " 10" )]))
343
+ client.send( h11.Data(data = b " 1234567890" ))
344
+ client.send( h11.EndOfMessage())
345
345
346
346
* Experiment with what happens if you try to violate the HTTP protocol
347
347
by sending a :class: `Response ` as a client, or sending two
0 commit comments