is there a method to add custom header to request when image is downloaded? I can use volley or okhttp in Glide.
I try add cookie to cookiemanager in okhttpclient, but it doesn't helped. Is there a method to debug request response in Glide?
Best regards Tom
Interceptors sound like a great choice. You can pass in your own instance of an OkHttp client to an OkHttpUrlLoader.Factory and register the Factory with Glide.
If you want more control, you can also simply fork the OkHttp ModelLoader and DataFetcher, register your forked ModelLoader, and get direct access to the OkHttp client for every request.
If you can't get Glide to do it, you can use OkHttp Interceptors.
Please read this thread: https://github.com/bumptech/glide/issues/198
It appears as if it will be implemented in the coming release (4.0).
}
and then
Since 3.6.0 it's possible to set custom headers for each request:
Try this:
The Glide reference is: