android - How to get errors from picasso2-okhttp3-downloader -


i using picasso download images , show them server. need set basic aucathention requests. , because of used this:

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

and code is:

   string url = "images/download/" + images.getiid();                  okhttpclient client = new okhttpclient.builder()                   .addinterceptor(new interceptor() {                     @override                     public response intercept(chain chain) throws ioexception {                        request newrequest = chain.request().newbuilder()                         .addheader("user_auth", user_auth)                         .addheader("user_password", user_pass)                         .build();                       return chain.proceed(newrequest);                     }                    })                   .build();                  picasso picasso = new picasso.builder(context)                   .downloader(new okhttp3downloader(client))                   .build();                  picasso.load(url)                   .error(r.drawable.error_icon_128)                   .into(view);               } 

but every time can't download images , can't see response code server. how can see response code?

thank you.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -