Page MenuHomePhabricator

OkHttp: update from OkUrlFactory to Request/Response API
Closed, ResolvedPublic2 Estimated Story Points

Description

OkUrlFactory is deprecated, and will be removed in an upcoming release (likely 4.0).

OkHttpConnectionFactory.java line 30:

return new OkUrlFactory(client).open(url); // TODO: update to newer API

See also: https://publicobject.com/2015/12/15/okurlfactory-is-going-away/

Event Timeline

MBinder_WMF set the point value for this task to 2.May 13 2016, 6:20 PM
• Mholloway renamed this task from Update OkUrlFactory.open() call to new API to OkHttp: update from OkUrlFactory to Request/Response API.Jun 14 2016, 3:31 PM
• Mholloway updated the task description. (Show Details)

Change 299265 had a related patch set uploaded (by Mholloway):
Convert remaining HttpURLConnection usages to OkHttp

https://gerrit.wikimedia.org/r/299265

Change 299265 merged by jenkins-bot:
Convert remaining HttpURLConnection usages to OkHttp

https://gerrit.wikimedia.org/r/299265

Not sure why this hadn't been resolved earlier. It's been merged for a while.

We're still using OkUrlFactory in OkHttpConnectionFactory: https://github.com/wikimedia/apps-android-wikipedia/blob/master/app/src/main/java/org/wikipedia/OkHttpConnectionFactory.java#L31

I haven't looked back at this recently but I think it's needed for HttpRequest via the java-mwapi library and, consequently, removing it is blocked on Retrofitting all of the remaining miscellaneous API calls.