-
Notifications
You must be signed in to change notification settings - Fork 6.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cookie Support #41
Comments
By default Glide uses Volley for its network operations. I don't have any specific experience setting headers and cookies, but it's definitely possible to setup Volley however you wish and pass in your own request queue or your own Request subclasses. You can also implement a relatively simple interface and use whatever networking stack you wish: http://bumptech.github.io/glide/docs/com/bumptech/glide/loader/stream/StreamLoader.html. For an example using volley, see https://github.com/bumptech/glide/blob/master/library/src/com/bumptech/glide/volley/VolleyStreamLoader.java. Once you've defined that interface, you then need just one call to the Glide singleton to replace our default network stack with your own. If you're interested I can also give you some documentation or examples on how that works. |
Can you please provide me with documentation and examples? |
For replacing the default network stack? |
Well, could you show me an example of what I would have to do to modify the headers or cookies? |
As I mentioned before, I've never done it myself. However, it looks like all you need to do is override getHeaders() in the volley request to set whatever you would like. You could start with essentially a copy/paste of VolleyStreamLoader I linked above and then override getHeaders() in the Request inner class. |
Ok, thank you. |
Both of those links are returning 404. |
I'm not sure if these are the refactored classes, but look at: Also: https://github.com/bumptech/glide#volley |
Yeah, just discovered I can't add volley to this project as an android library. The simplest way I that I can think to do this, is something like the setDefaultOptions except it exposed the request prior to executing the HTTP call. |
I haven't really used Glide yet. How do I set headers and use cookies?
The text was updated successfully, but these errors were encountered: