Latest 0.0.3
License BSD
Platforms ios 7.0, requires ARC
Dependencies CocoaHTTPServer

The goal is to be an embedded HTTP Server used for testing. The idea is for your test you create an instance of a server, give it a set of conditions to watch for and the response when a condition is met.

Here is a simple testing example:

- (void)testGetStringFromServer {

    // Create Manager
    HTTPExpressManager* server = [[HTTPExpressManager alloc] init]; // Create instead of manager (server)

    // Connect request and response to server
    NSURL* expectedURL = [NSURL URLWithString:[NSString stringWithFormat:@"%@/", [server urlStringForHost]]];
    NSString* expectedString = @"This is what we expect to get back";
    [server connectURL:expectedURL withString:expectedString];

    // Test
    NSString* string = [NSString stringWithContentsOfURL:expectedURL encoding:NSUTF8StringEncoding error:nil]; // Make server call
    XCTAssertTrue([expectedString isEqualToString:string], @"Strings do not match! expected: %@  got: %@", expectedString, string);


  1. Add CocoaHTTPServerExpress to your project’s Podfile:

    target :MyApp do
    # Your app's dependencies
    target :MyAppTests do
      pod 'CocoaHTTPServerExpress', :git => ''
  2. Run pod update or pod install in your project directory.

Latest podspec

    "name": "CocoaHTTPServerExpress",
    "version": "0.0.3",
    "license": "BSD",
    "summary": "Embeddable HTTP server that make testing easier.",
    "homepage": "",
    "authors": {
        "Christopher Evans": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.0.3"
    "source_files": "CocoaHTTPServerExpress/HTTPExpress/**/*.{h,m}",
    "platforms": {
        "ios": "7.0"
    "requires_arc": true,
    "dependencies": {
        "CocoaHTTPServer": []

Pin It on Pinterest

Share This