Simple HTTP Mocking for iOS
[FakeHTTP startMocking];
NSURL *url = [NSURL URLWithString:@"http://example.com/foo"];
NSData *bodyData = [@"hello" dataUsingEncoding:NSUTF8StringEncoding];
NSDictionary *headers = [NSDictionary dictionaryWithObject:@"bar" forKey:@"foo"];
FakeHTTPURLResponse *response = [[FakeHTTPURLResponse alloc] initWithStatusCode:200 headers:headers body:data];
[FakeHTTP registerURL:url withResponse:response];