Skip to content

emil10001/OkHttpAndroidExample

Repository files navigation

OkHttp Android Example

This is a simple example of implementing Square's OkHttp library in an Android app

Full write-up is here.

OkHttp

Step zero is getting OkHttp either as a jar, or pulling down the project and building a jar with maven. When I built this, the jar was not available, so I needed to build it myself. This was quite simple, all you need to do is make sure you have Maven2 installed, and follow the instructions on OkHttp's github page.

One thing to note is that you need to be building against the parent project, not just the okhttp dir. Sometimes people package up git repos such that there are actually multiple projects in a single repo, and you only need to use one of the dirs in the project. In this case, you need the parent, it will build the child projects for you.

Building:

mvn clean
mvn package -DskipTests

After you build, the jar will be in okhttp/targets.

This git repo bundles a version of okhttp that I build, but it would be better to pull down a more recent version.

Otto

I'm also using Otto here. Check out my post on Otto for a quick primer.

About

An example implementation of the OkHttp http client library by Square

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages