Skip to content

kseebaldt/FakeHTTP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple HTTP Mocking for iOS

Start mocking HTTP connections

[FakeHTTP startMocking];

Mock a request for a URL

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];

About

simple HTTP mocking for iOS testing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •