rlalfo / google-http-java-client

Automatically exported from code.google.com/p/google-http-java-client
0 stars 0 forks source link

Add OkHttp transport #227

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Currently for Android you have Apache and UrlConnection based transports.

Square has very good alternative http client that works for Android 2.2 and 
higher. 

https://github.com/square/okhttp

Original issue reported on code.google.com by alexey.v...@gmail.com on 29 May 2013 at 11:13

GoogleCodeExporter commented 9 years ago
I made my own implementation which is based on recent source code of 
NetworkTransport

https://gist.github.com/lexer/5669648

Original comment by alexey.v...@gmail.com on 29 May 2013 at 11:36

GoogleCodeExporter commented 9 years ago
This is sufficient to use OkHttp everywhere you're using HttpURLConnection:
  URL.setURLStreamHandlerFactory(new OkHttpClient());

Original comment by limpbizkit on 17 Jun 2013 at 12:11

GoogleCodeExporter commented 9 years ago
Thanks Jesse

Original comment by alexey.v...@gmail.com on 21 Apr 2014 at 4:37