khateeb
khateeb

Reputation: 5469

How to write an OkHttp3 stack for Volley for Android M and above?

I want to create an OkHttp3Stack for Volley which implements com.android.volley.toolbox.HttpStack. The gists currently present (example) use Apache HTTP which has been removed in Android M. How do I write an OkHttp3Stack without Apache Http for Android M and above?

Upvotes: 1

Views: 1526

Answers (1)

LOG_TAG
LOG_TAG

Reputation: 20569

A per the latest Volley 1.1.0 release we should follow Migrating-from-Apache-HTTP while creating OkHttp3 Stack for volley!

here I want to share the code for OkHttp3 Stack for Volley 1.1.0 release which doesn't uses any of the deprecated apache dependencies !!

Source code: VolleyOkHttp3StackInterceptors.java (Tested)

Upvotes: 1

Related Questions