librelist archives

« back to archive

How can I know the server has done sending my response to the client?

How can I know the server has done sending my response to the client?

From:
David Chavez
Date:
2015-03-24 @ 08:57
Hello every body,

I'm working on an application that requires knowing when the server
has finished sending my response to the client in order to perform
some other actions, I've tried the Response.call_on_close for
registering some function to do what I want but no luck at all.

If what I'm trying to do is possible, please help me, I've been
looking on the web for several days and I found nothing.

Thanks in advance.

Re: [flask] How can I know the server has done sending my response to the client?

From:
Samuel Čavoj
Date:
2015-03-26 @ 20:29
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

If you mean when the last byte of the response left the server, I do not
think that is possible to do in Flask. You would probably need to modify
the wsgi server you are using (Gunicorn, uWSGI, etc.), which in case of
the integrated development server is Werkzeug. We may be able to help if
you elaborate what for you need to do this. It is quite an unusual thing.

On 03/24/2015 09:57 AM, David Chavez wrote:
> Hello every body,
>
> I'm working on an application that requires knowing when the server
> has finished sending my response to the client in order to perform
> some other actions, I've tried the Response.call_on_close for
> registering some function to do what I want but no luck at all.
>
> If what I'm trying to do is possible, please help me, I've been
> looking on the web for several days and I found nothing.
>
> Thanks in advance.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJVFGw4AAoJEBthnZ1RV+uo1ZcH/A4dESk1rbdPSm71nht/L217
IfTw53tLlJNAs2B1ddUVY8FfwmmrZbGOi0GKg9DJ7L2vJsXDmd2f9ppXtd69RfmW
JlGmhjbgGaLQzIjqAHEORO+DiZT8ZVTteR8dPDYrltgpI+I4oNMXdABzhb31cXYp
myjwqJGj5AV0UnZUTzzgPNJgWLqe9cO6F0aVYdbalTeON28uUidRntNNQnlh41ii
jZrkfRCRaBXuv4ybZC8+sr0L1OnYpHBMbMR+0J1/mumaFi8esH0Au0t2hxgOIJqa
SjHDcL0tHxFNoKCDiaaFwGHKS+LAY5RlqmUHdEOJ8fkKN7pR9GEzveKv7a/LCBY=
=Y1Y5
-----END PGP SIGNATURE-----

Re: [flask] How can I know the server has done sending my response to the client?

From:
Felipe Barreto Volpone
Date:
2015-03-27 @ 03:09
Hey, if u are using webapp2, check out the dispatch method in the docs.
(You'll need an RequestHandler, not an flask Router).

https://webapp-improved.appspot.com/guide/handlers.html
Em 26/03/2015 17:36, "Samuel Čavoj" <sammko@sammserver.com> escreveu:

>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> If you mean when the last byte of the response left the server, I do not
> think that is possible to do in Flask. You would probably need to modify
> the wsgi server you are using (Gunicorn, uWSGI, etc.), which in case of
> the integrated development server is Werkzeug. We may be able to help if
> you elaborate what for you need to do this. It is quite an unusual thing.
>
> On 03/24/2015 09:57 AM, David Chavez wrote:
> > Hello every body,
> >
> > I'm working on an application that requires knowing when the server
> > has finished sending my response to the client in order to perform
> > some other actions, I've tried the Response.call_on_close for
> > registering some function to do what I want but no luck at all.
> >
> > If what I'm trying to do is possible, please help me, I've been
> > looking on the web for several days and I found nothing.
> >
> > Thanks in advance.
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2
>
> iQEcBAEBCAAGBQJVFGw4AAoJEBthnZ1RV+uo1ZcH/A4dESk1rbdPSm71nht/L217
> IfTw53tLlJNAs2B1ddUVY8FfwmmrZbGOi0GKg9DJ7L2vJsXDmd2f9ppXtd69RfmW
> JlGmhjbgGaLQzIjqAHEORO+DiZT8ZVTteR8dPDYrltgpI+I4oNMXdABzhb31cXYp
> myjwqJGj5AV0UnZUTzzgPNJgWLqe9cO6F0aVYdbalTeON28uUidRntNNQnlh41ii
> jZrkfRCRaBXuv4ybZC8+sr0L1OnYpHBMbMR+0J1/mumaFi8esH0Au0t2hxgOIJqa
> SjHDcL0tHxFNoKCDiaaFwGHKS+LAY5RlqmUHdEOJ8fkKN7pR9GEzveKv7a/LCBY=
> =Y1Y5
> -----END PGP SIGNATURE-----
>
>
>

Re: [flask] How can I know the server has done sending my response to the client?

From:
David Chavez
Date:
2015-03-31 @ 05:54
HI Felipe and Samuel, that thing of knowing when the server done with
my response to the client, i dropped it, it was really not too much
needed, but thanks any way, cheers.

On 3/26/15, Felipe Barreto Volpone <felipevolpone@gmail.com> wrote:
> Hey, if u are using webapp2, check out the dispatch method in the docs.
> (You'll need an RequestHandler, not an flask Router).
>
> https://webapp-improved.appspot.com/guide/handlers.html
> Em 26/03/2015 17:36, "Samuel Čavoj" <sammko@sammserver.com> escreveu:
>
>>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA256
>>
>> If you mean when the last byte of the response left the server, I do not
>> think that is possible to do in Flask. You would probably need to modify
>> the wsgi server you are using (Gunicorn, uWSGI, etc.), which in case of
>> the integrated development server is Werkzeug. We may be able to help if
>> you elaborate what for you need to do this. It is quite an unusual thing.
>>
>> On 03/24/2015 09:57 AM, David Chavez wrote:
>> > Hello every body,
>> >
>> > I'm working on an application that requires knowing when the server
>> > has finished sending my response to the client in order to perform
>> > some other actions, I've tried the Response.call_on_close for
>> > registering some function to do what I want but no luck at all.
>> >
>> > If what I'm trying to do is possible, please help me, I've been
>> > looking on the web for several days and I found nothing.
>> >
>> > Thanks in advance.
>>
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v2
>>
>> iQEcBAEBCAAGBQJVFGw4AAoJEBthnZ1RV+uo1ZcH/A4dESk1rbdPSm71nht/L217
>> IfTw53tLlJNAs2B1ddUVY8FfwmmrZbGOi0GKg9DJ7L2vJsXDmd2f9ppXtd69RfmW
>> JlGmhjbgGaLQzIjqAHEORO+DiZT8ZVTteR8dPDYrltgpI+I4oNMXdABzhb31cXYp
>> myjwqJGj5AV0UnZUTzzgPNJgWLqe9cO6F0aVYdbalTeON28uUidRntNNQnlh41ii
>> jZrkfRCRaBXuv4ybZC8+sr0L1OnYpHBMbMR+0J1/mumaFi8esH0Au0t2hxgOIJqa
>> SjHDcL0tHxFNoKCDiaaFwGHKS+LAY5RlqmUHdEOJ8fkKN7pR9GEzveKv7a/LCBY=
>> =Y1Y5
>> -----END PGP SIGNATURE-----
>>
>>
>>
>