# AliSoftware/OHHTTPStubs

Stub your network requests easily! Test your apps with fake network data and custom response time, response code and headers!

Repository: https://github.com/AliSoftware/OHHTTPStubs
Canonical: https://ross.abutalabs.com/products/ohhttpstubs
Language: Objective-C
License: MIT
License Family: permissive
Topics: ios, stubbing, network, swift, objective-c, stub, ohhttpstubs, mock, mock-server, mocking
Last push: 2024-05-09T20:34:35+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 5167, "days_push": 846, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5072, forks 597 (observed 2026-08-28T04:09:09.362978+00:00)

## What it is
OHHTTPStubs is an Objective-C/Swift library for stubbing network requests in iOS and macOS apps. It intercepts requests made through Cocoa's URL Loading System and returns fake responses with custom data, status codes, headers, and simulated latency.

## Use cases
- stub network requests in iOS unit tests with fixture files
- simulate slow network conditions to test app behavior
- mock API responses for Alamofire or AFNetworking requests
- return custom status codes and headers in tests
- test offline and error scenarios without a real server

## When to choose
- you're building iOS/macOS apps using NSURLSession, AFNetworking, or Alamofire and need deterministic network responses in tests
- you want to simulate bad network conditions like latency or failures
- you prefer stubbing at the URL Loading System level rather than running a mock server

## When to avoid
- your app uses a networking stack that bypasses Cocoa's URL Loading System
- you need integration testing against a real or containerized mock server
- you're developing for platforms outside Apple's ecosystem

## Facets
- artifact type: library
- maturity: maintenance
- function: mocking, testing, http-client
- domain: testing, mobile-development, developer-tools
- platform: -
- tags: network-stubbing, unit-testing, url-loading-system, objective-c, fake-network-data, slow-network-simulation, ios, macos, swift

## Member repositories
- AliSoftware/OHHTTPStubs (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:09.362978+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:02:48.096444+00:00, confidence not recorded.
  - readme: https://github.com/AliSoftware/OHHTTPStubs (fetched 2026-08-28T04:09:09.362978+00:00, sha 5cf86e6c35b0)
- Data as of 2026-08-30T08:39:29.467469+00:00.
