Http Request Session Handling

1,307 views
Skip to first unread message

pmza...@gmail.com

unread,
Aug 14, 2016, 10:33:53 PM8/14/16
to Flutter Dev
Hello,

I am wondering what the easiest way is to preserve sessions across multiple http requests.  Right now I am using 'package:flutter/http.dart' for making the requests, but it does not seem to preserve the sessions.

Thanks!

Ian Hickson

unread,
Aug 14, 2016, 11:18:50 PM8/14/16
to pmza...@gmail.com, Flutter Dev
By sessions, do you mean cookies?

--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Peter Zakula

unread,
Aug 14, 2016, 11:29:27 PM8/14/16
to Flutter Dev

Yes, I mean cookies


On Aug 14, 2016 10:18 PM, "Ian Hickson" <i...@hixie.ch> wrote:
By sessions, do you mean cookies?

On Sun, Aug 14, 2016 at 7:33 PM <pmza...@gmail.com> wrote:
Hello,

I am wondering what the easiest way is to preserve sessions across multiple http requests.  Right now I am using 'package:flutter/http.dart' for making the requests, but it does not seem to preserve the sessions.

Thanks!

--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev+unsubscribe@googlegroups.com.

Seth Ladd

unread,
Aug 15, 2016, 1:37:30 PM8/15/16
to Peter Zakula, Flutter Dev
Hi Peter,

Thanks for reaching out!

There's a few APIs that might help:


https://docs.flutter.io/flutter/services/PathProvider-class.html <== how to identify which directories you can use

In the meantime, I've filed a request for a simple snippet/example of how to use these together: https://github.com/flutter/flutter/issues/5392

pmza...@gmail.com

unread,
Aug 15, 2016, 2:07:13 PM8/15/16
to Flutter Dev, pmza...@gmail.com
Hi Seth!

I thought that there might be an easier way that is similar to what Android uses...

For Instance:
CookieManager.setDefault(CookieHandler.getDefault())

Maybe something easier will come out in the future.

Thanks for the help!


On Monday, August 15, 2016 at 12:37:30 PM UTC-5, Seth Ladd wrote:
Hi Peter,

Thanks for reaching out!

There's a few APIs that might help:


https://docs.flutter.io/flutter/services/PathProvider-class.html <== how to identify which directories you can use

In the meantime, I've filed a request for a simple snippet/example of how to use these together: https://github.com/flutter/flutter/issues/5392
On Sun, Aug 14, 2016 at 8:29 PM, Peter Zakula <pmza...@gmail.com> wrote:

Yes, I mean cookies


On Aug 14, 2016 10:18 PM, "Ian Hickson" <i...@hixie.ch> wrote:
By sessions, do you mean cookies?

On Sun, Aug 14, 2016 at 7:33 PM <pmza...@gmail.com> wrote:
Hello,

I am wondering what the easiest way is to preserve sessions across multiple http requests.  Right now I am using 'package:flutter/http.dart' for making the requests, but it does not seem to preserve the sessions.

Thanks!

--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.

Ian Hickson

unread,
Aug 15, 2016, 2:11:06 PM8/15/16
to pmza...@gmail.com, Flutter Dev
Currently you have to manage your own cookies, unfortunately. You're right that we should have this baked into our networking library. We're still trying to figure out exactly how we want our networking library to work (we don't like the current situation where we have two redundant libraries, for instance).

pmza...@gmail.com

unread,
Aug 15, 2016, 2:14:27 PM8/15/16
to Flutter Dev, pmza...@gmail.com
Hey Ian,

Thanks for the clarity.  
I agree it would be easier to have it all in one library.  For now I will just handle the cookies manually.

I appreciate the support!

Peter 

Kris Giesing

unread,
Aug 15, 2016, 2:14:52 PM8/15/16
to Ian Hickson, pmza...@gmail.com, Flutter Dev
I've taken the liberty of filing https://github.com/flutter/flutter/issues/5396 to track this request. Feel free to add more detail there.

To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev+unsubscribe@googlegroups.com.

Seth Ladd

unread,
Aug 15, 2016, 2:16:47 PM8/15/16
to Ian Hickson, pmza...@gmail.com, Flutter Dev
On Mon, Aug 15, 2016 at 11:10 AM, Ian Hickson <i...@hixie.ch> wrote:
Currently you have to manage your own cookies, unfortunately. You're right that we should have this baked into our networking library. We're still trying to figure out exactly how we want our networking library to work (we don't like the current situation where we have two redundant libraries, for instance).

On Mon, Aug 15, 2016 at 11:07 AM <pmza...@gmail.com> wrote:
Hi Seth!

I thought that there might be an easier way that is similar to what Android uses...

If you don't mind, we'd love a feature request: https://github.com/flutter/flutter/issues/new

Thanks for the feedback!
 
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev+unsubscribe@googlegroups.com.

pmza...@gmail.com

unread,
Aug 15, 2016, 2:28:47 PM8/15/16
to Flutter Dev, i...@hixie.ch, pmza...@gmail.com
Reply all
Reply to author
Forward
0 new messages