@@ -238,8 +238,8 @@ And then we can send requests:
238238 client = MyHttpClient(" httpbin.org" , 443 )
239239
240240 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())
243243
244244 And read back the events:
245245
@@ -321,8 +321,8 @@ allowing us to send another :class:`Request`:
321321 client.conn.our_state, client.conn.their_state
322322
323323 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())
326326 client.next_event()
327327
328328
@@ -339,9 +339,9 @@ Here's some ideas of things you might try:
339339
340340 client.send(h11.Request(method = " POST" , target = " /post" ,
341341 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())
345345
346346 * Experiment with what happens if you try to violate the HTTP protocol
347347 by sending a :class: `Response ` as a client, or sending two
0 commit comments