Re:Re: why the connection set with “keep live” in urllib.request always set to be“closed, thanks

2020-08-18 Thread xuanwu348
Thanks all, I had met this problem was when I did restapi test. I send a request by python script and the time processed by server very short, and another request send by postman, the time seems normal, I compare the diff between these two request, obvious difference is the connection, which i

Re: why the connection set with “keep live” in urllib.request always set to be“closed, thanks

2020-08-18 Thread Barry Scott
> On 18 Aug 2020, at 02:16, xuanwu348 wrote: > > > This means I want to structure my request header with "Connection: keep > alive" for the server which support connect alive, > But I checked the requeset header send by myself, the connection still > closed, no affect by set > > And I also

Re:Re: why the connection set with “keep live” in urllib.request always set to be“closed, thanks

2020-08-17 Thread xuanwu348
This means I want to structure my request header with "Connection: keep alive" for the server which support connect alive, But I checked the requeset header send by myself, the connection still closed, no affect by set And I also found this in python document: ==

Re: why the connection set with “keep live” in urllib.request always set to be“closed, thanks

2020-08-17 Thread Barry
> On 17 Aug 2020, at 18:23, xuanwu348 wrote: > > hi everyone > > > Good day, the code as below, I try to make a long connection by set the > connection to "keep-alive", but actually it's not as expected. Why? Thanks What this means is. Please web server keep the connect alive if you can.

why the connection set with “keep live” in urllib.request always set to be“closed, thanks

2020-08-17 Thread xuanwu348
hi everyone Good day, the code as below, I try to make a long connection by set the connection to "keep-alive", but actually it's not as expected. Why? Thanks import urllib.request as req headers = {"authorization": "Bearer {}".format(self.token), "Content-Type": "multipart