Skip to content
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

header is not used in plugin anywhere #219

Open
ssrazeen opened this issue Sep 21, 2021 · 1 comment
Open

header is not used in plugin anywhere #219

ssrazeen opened this issue Sep 21, 2021 · 1 comment

Comments

@ssrazeen
Copy link

Hi,
The option gets the header, but it never used.
Could you please add the header implementation as picasso add header

OkHttpClient client = new OkHttpClient.Builder()
.addInterceptor(new Interceptor() {
@OverRide
public Response intercept(Chain chain) throws IOException {
Request newRequest = chain.request().newBuilder()
.addHeader("X-TOKEN", "VAL")
.build();
return chain.proceed(newRequest);
}
})
.build();

Picasso picasso = new Picasso.Builder(context)
.downloader(new OkHttp3Downloader(client))
.build();

@rolinger
Copy link

@ssrazeen - I have come across the same. This impacts Android only, as it seems the header is being passed in iOS and is working correctly. Have you gotten around this somehow?

I think for the above to work this line must be added to the gradle file:

compile 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.1.0'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants