-
Notifications
You must be signed in to change notification settings - Fork 264
OkHttpClientHttpRequestFactory prevents usings OkHttp interceptors #24
Comments
I'm also trying to use Stetho with interceptors and I have this problem too. |
Guys, how an other implementation should look like? I assume it cannot be achieved easily. |
Spring Framework recently included OkHttp support. It can probably be adapted for android. Sent from my iPad
|
Can you reference the changeset which did that? |
@royclarkson can you point me to the changeset? :) |
Never mind. 😉 Thanks for fixing this! |
@WonderCsabo I spent some time last night and modified the implementation from Spring Framework. It should be in a good place now. |
I pushed 2.0.0.M3 with the latest OkHttp support. It's available for testing from the spring repository. |
@royclarkson i am getting this exception:
The same call worked with M2. |
Hmm. Looks like there was a change in OkHttp 2.4 to require a request body. The dependency was updated from 2.1.0 to 2.4.0 in the M3 release. Would you mind opening a new issue please? We can probably handle this situation. |
@royclarkson i am not sure about that. I was already using OkHttp 2.4 and i experienced no problems with the old |
M2 was using the UrlConnection API, instead of a proper implementation. That might be why it was still working. I'm guessing at this point. |
Yeah, i know that. :) I opened #25. |
Heh. Thanks for the reminder. :) |
OkHttpClientHttpRequestFactory uses OkUrlFactory.
With OkHttp 2.2.0 comes a new great feature: Interceptors. Interceptors won't work when using OkUrlFactory, as explained here: /~https://github.com/square/okhttp/wiki/Interceptors
Can you provide a different implementation of OkHttpClientHttpRequestFactory that don't use OkUrlFactory so we can use interceptors?
(FYI http://facebook.github.io/stetho/ needs OkHttp interceptors)
The text was updated successfully, but these errors were encountered: