pivotal/robolectric — pull request #208 by jberkel (2012-02-29 04:08:26+00:00)
Title: Support for real http requests

Not sure about this implementation so opening up for discussion. I've tried a few different things but always got stuck with ClassLoader problems, so I thought the easiest way to implement this is to actually copy the DefaultHttpRedirector to another package and delegate to it.

A user can just disable/enable real requests like so:

```
Robolectric.getFakeHttpLayer().setEnabled(false);
DefaultHttpClient client = new DefaultHttpClient();
client.execute(new HttpGet("http://somehost.com"));
```

Might be useful for writing integration tests which require a real server, or for performing requests to obtain mock data.