# MockHTTP HTTP mock server and httpbin replacement for API testing. Run it at mockhttp.org, in Docker, or in Node.js. Source Index: https://mockhttp.org/llms.txt ## Documentation ### Getting Started URL: https://mockhttp.org/docs/ # Getting Started [![tests](https://github.com/jaredwray/mockhttp/actions/workflows/tests.yaml/badge.svg)](https://github.com/jaredwray/mockhttp/actions/workflows/tests.yaml) [![GitHub license](https://img.shields.io/github/license/jaredwray/mockhttp)](https://github.com/jaredwray/mockhttp/blob/master/LICENSE) [![codecov](https://codecov.io/gh/jaredwray/mockhttp/graph/badge.svg?token=eqtqoA3olU)](https://codecov.io/gh/jaredwray/mockhttp) [![npm](https://img.shields.io/npm/dm/@jaredwray/mockhttp)](https://npmjs.com/package/@jaredwray/mockhttp) [![npm](https://img.shields.io/npm/v/@jaredwray/mockhttp)](https://npmjs.com/package/@jaredwray/mockhttp) [![Docker Pulls](https://img.shields.io/docker/pulls/jaredwray/mockhttp)](https://hub.docker.com/r/jaredwray/mockhttp) [![mockhttp.org](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fjaredwray.com%2Fapi%2Fmockhttp-traffic&query=%24.message&label=mockhttp.org)](https://mockhttp.org) A simple HTTP server for mocking responses in tests. Inspired by [httpbin](https://httpbin.org/) and built with Node.js and Fastify. Run it at [mockhttp.org](https://mockhttp.org), with Docker (`jaredwray/mockhttp`), or in Node.js (`npm install @jaredwray/mockhttp`). ## Features - All the features of [httpbin](https://httpbin.org/) - [Taps](/docs/taps/) — inject custom responses for testing and development - [Bins](/docs/bins/) — capture and inspect incoming HTTP requests (great for webhook debugging) - `@fastify/helmet` built in by default - Built with Node.js, TypeScript, and Fastify - Run it in Node.js, or deploy with [Docker](/docs/how-to-deploy/docker/), [Cloudflare Workers](/docs/how-to-deploy/cloudflare/), or [Wasmer Edge](/docs/how-to-deploy/wasmer/) - Free hosted service at [mockhttp.org](https://mockhttp.org), running on Cloudflare - Documentation site and interactive [OpenAPI reference](/api/) - Auto-detect the next port that is not in use - [HTTPS and HTTP/2](/docs/https/), plus [rate limiting, logging, and URL matching](/docs/configuration/) ## Deploy via Docker ```bash docker run -d -p 3000:3000 jaredwray/mockhttp ``` ## Deploy via Docker Compose ```yaml services: mockhttp: image: jaredwray/mockhttp:latest ports: - "3000:3000" ``` If you want to run it on a different port, just change the `3000` to whatever port you want and add in the environment variable `PORT` to the environment. ```yaml services: mockhttp: image: jaredwray/mockhttp:latest ports: - "3001:3001" environment: - PORT=3001 ``` You can see an example of this in the [docker-compose.yaml](https://github.com/jaredwray/mockhttp/blob/main/docker-compose.yaml) file. ## Deploy via Node.js ```bash npm install @jaredwray/mockhttp --save ``` then run `mockhttp` in your code. ```javascript import { MockHttp } from '@jaredwray/mockhttp'; const mock = new MockHttp(); await mock.start(); // start the server const response = await fetch('http://localhost:3000/get'); console.log(response); await mock.close(); // stop the server ``` Step-by-step deploy guides: [Docker](/docs/how-to-deploy/docker/), [Cloudflare](/docs/how-to-deploy/cloudflare/), and [Wasmer](/docs/how-to-deploy/wasmer/). ### HTTPS and HTTP/2 URL: https://mockhttp.org/docs/https/ # HTTPS Support MockHttp supports HTTPS with auto-generated self-signed certificates or your own custom certificates. No external dependencies are required — certificate generation uses only Node.js built-in `crypto`. ## Auto-Generated Certificate The simplest way to enable HTTPS is to pass `https: true`. A self-signed certificate for `localhost` is generated automatically: ```javascript import { MockHttp } from '@jaredwray/mockhttp'; const mock = new MockHttp({ https: true }); await mock.start(); console.log(mock.isHttps); // true // Use Fastify's built-in inject() for testing (no TLS setup needed) const response = await mock.server.inject({ method: 'GET', url: '/get' }); console.log(response.statusCode); // 200 await mock.close(); ``` > **Note:** Self-signed certificates are not trusted by default. When making real HTTPS requests (e.g. with `fetch`), set `NODE_TLS_REJECT_UNAUTHORIZED=0` in your test environment or use a custom HTTPS agent. ## Custom Certificate Options You can customize the auto-generated certificate by passing `certificateOptions`: ```javascript const mock = new MockHttp({ https: { certificateOptions: { commonName: 'my-test-server', validityDays: 30, keySize: 4096, altNames: [ { type: 'dns', value: 'example.local' }, { type: 'dns', value: '*.example.local' }, { type: 'ip', value: '192.168.1.100' }, ], }, }, }); await mock.start(); // Make requests... await mock.close(); ``` ## Provide Your Own Certificate You can supply your own PEM-encoded certificate and key, either as strings or file paths: ```javascript // Using PEM strings const mock = new MockHttp({ https: { cert: '-----BEGIN CERTIFICATE-----\n...', key: '-----BEGIN PRIVATE KEY-----\n...', }, }); await mock.start(); // Make requests... await mock.close(); ``` ```javascript // Using file paths const mock = new MockHttp({ https: { cert: '/path/to/cert.pem', key: '/path/to/key.pem', }, }); await mock.start(); // Make requests... await mock.close(); ``` ## Standalone Certificate Generation You can also generate certificates independently using the exported utility functions: ```javascript import { generateCertificate, generateCertificateFiles } from '@jaredwray/mockhttp'; // Generate in-memory PEM strings const { cert, key } = generateCertificate({ commonName: 'my-app', validityDays: 90, }); // Generate and write to disk const result = await generateCertificateFiles({ certPath: './certs/cert.pem', keyPath: './certs/key.pem', commonName: 'my-app', }); ``` ## HTTPS Options Reference | Option | Type | Default | Description | |--------|------|---------|-------------| | `cert` | string | — | PEM-encoded certificate string or file path | | `key` | string | — | PEM-encoded private key string or file path | | `autoGenerate` | boolean | `true` | Auto-generate a self-signed certificate when cert/key are not provided | | `certificateOptions` | CertificateOptions | — | Options for the auto-generated certificate | ### Certificate Options | Option | Type | Default | Description | |--------|------|---------|-------------| | `commonName` | string | `'localhost'` | Certificate subject Common Name (CN) | | `altNames` | Array\<{ type, value }\> | `[dns:localhost, ip:127.0.0.1, ip:::1]` | Subject Alternative Names with type `'dns'` or `'ip'` | | `validityDays` | number | `365` | Certificate validity period in days | | `keySize` | number | `2048` | RSA key size in bits | # HTTP/2 Support MockHttp supports HTTP/2 in two modes: - **h2** — HTTP/2 over TLS (used by browsers), enabled with both `http2: true` and `https: true` - **h2c** — HTTP/2 cleartext (no TLS), enabled with just `http2: true`, useful for service-to-service testing ## HTTP/2 over TLS (h2) ```javascript import { MockHttp } from '@jaredwray/mockhttp'; const mock = new MockHttp({ http2: true, https: true }); await mock.start(); console.log(mock.http2); // true console.log(mock.isHttps); // true const response = await mock.server.inject({ method: 'GET', url: '/get' }); console.log(response.statusCode); // 200 await mock.close(); ``` By default, HTTP/1.1 clients can still connect via ALPN negotiation (`http1` defaults to `true`). To disable HTTP/1.1 fallback: ```javascript const mock = new MockHttp({ http2: true, https: true, http1: false }); await mock.start(); ``` ## HTTP/2 Cleartext (h2c) ```javascript const mock = new MockHttp({ http2: true }); await mock.start(); console.log(mock.http2); // true await mock.close(); ``` > **Note:** Browsers do not support h2c. This mode is useful for testing gRPC or service-to-service communication. ## HTTP/2 via Environment Variable ```bash HTTP2=true node your-app.js ``` ### Taps URL: https://mockhttp.org/docs/taps/ # Response Injection (Tap Feature) The injection/tap feature allows you to "tap into" the request flow and inject custom responses for specific requests. This is particularly useful for: - **Offline testing** - Mock external API responses without network access - **Testing edge cases** - Simulate errors, timeouts, or specific response scenarios - **Development** - Work on your application without depending on external services ## What is a "Tap"? A "tap" is a reference to an injected response, similar to "wiretapping" - you're intercepting requests and returning predefined responses. Each tap can be removed when you're done with it, restoring normal server behavior. ## Basic Usage ```javascript import { mockhttp } from '@jaredwray/mockhttp'; const mock = new mockhttp(); await mock.start(); // Inject a simple response const tap = mock.taps.inject( { response: "Hello, World!", statusCode: 200, headers: { "Content-Type": "text/plain" } }, { url: "/api/greeting", method: "GET" } ); // Make requests - they will get the injected response const response = await fetch('http://localhost:3000/api/greeting'); console.log(await response.text()); // "Hello, World!" // Remove the injection when done mock.taps.removeInjection(tap); await mock.close(); ``` ## Advanced Examples ### Inject JSON Response ```javascript const tap = mock.taps.inject( { response: { message: "Success", data: { id: 123 } }, statusCode: 200 }, { url: "/api/users/123" } ); ``` ### Wildcard URL Matching ```javascript // Match all requests under /api/ const tap = mock.taps.inject( { response: "API is mocked", statusCode: 503 }, { url: "/api/*" } ); ``` ### Multiple Injections ```javascript const tap1 = mock.taps.inject( { response: "Users data" }, { url: "/api/users" } ); const tap2 = mock.taps.inject( { response: "Posts data" }, { url: "/api/posts" } ); // View all active injections console.log(mock.taps.injections); // Map of all active taps // Remove specific injections mock.taps.removeInjection(tap1); mock.taps.removeInjection(tap2); ``` ### Match by HTTP Method ```javascript // Only intercept POST requests const tap = mock.taps.inject( { response: "Created", statusCode: 201 }, { url: "/api/users", method: "POST" } ); ``` ### Match by Headers ```javascript const tap = mock.taps.inject( { response: "Authenticated response" }, { url: "/api/secure", headers: { "authorization": "Bearer token123" } } ); ``` ### Catch-All Injection ```javascript // Match ALL requests (no matcher specified) const tap = mock.taps.inject({ response: "Server is in maintenance mode", statusCode: 503 }); ``` ### Dynamic Function Response You can provide a function that dynamically generates the response based on the incoming request: ```javascript // Function response with access to the request object const tap = mock.taps.inject( (request) => { return { response: { message: `You requested ${request.url}`, method: request.method, timestamp: new Date().toISOString() }, statusCode: 200, headers: { "X-Request-Path": request.url } }; }, { url: "/api/*" } ); ``` ```javascript // Conditional responses based on request const tap = mock.taps.inject((request) => { // Return error for URLs containing 'error' if (request.url.includes('error')) { return { response: { error: "Something went wrong" }, statusCode: 500 }; } // Return success for everything else return { response: { status: "success" }, statusCode: 200 }; }); ``` ```javascript // Dynamic headers based on request const tap = mock.taps.inject( (request) => ({ response: "OK", statusCode: 200, headers: { "X-Original-Method": request.method, "X-Original-URL": request.url, "X-Original-Host": request.hostname } }), { url: "/api/mirror" } ); ``` ### Bins URL: https://mockhttp.org/docs/bins/ # Request Bins Bins are ephemeral URL endpoints that **capture incoming HTTP requests** so you can inspect them later. They're the inverse of Taps: instead of injecting a response, they record everything they receive. Useful for: - **Debugging webhooks** — point Stripe / GitHub / Slack at a bin URL and see exactly what they send - **Exercising client SDKs** — verify your SDK sends the request shape you expect - **Recording fixtures** — capture real traffic to replay in tests later There are two URL prefixes: - **`/bins`** — JSON management API: create, list, inspect, delete bins - **`/b/:id`** — the capture URL. Any HTTP method, any sub-path, any body sent here is stored against bin `:id` ## Quick Start ```bash # 1. create a bin curl -s -X POST http://localhost:3000/bins # → { "id": "abc123def456", "url": "http://localhost:3000/b/abc123def456", # "createdAt": "2026-05-18T12:00:00.000Z", # "expiresAt": "2026-05-19T12:00:00.000Z", # "requestCount": 0 } # 2. send anything to the capture URL curl -X POST "http://localhost:3000/b/abc123def456/webhook?source=stripe" \ -H 'content-type: application/json' \ -d '{"event":"payment.succeeded"}' # → { "ok": true, "binId": "abc123def456", "requestId": "f9c2e1a40b3d" } # 3. list captured requests (newest first) curl http://localhost:3000/bins/abc123def456/requests ``` ## Endpoints | Method | Path | Description | |--------|------|-------------| | POST | `/bins` | Create a new bin | | GET | `/bins` | List all active bins | | GET | `/bins/:id` | Get bin metadata | | GET | `/bins/:id/requests` | List captured requests (newest first) | | GET | `/bins/:id/requests/:reqId` | Get a single captured request | | DELETE | `/bins/:id/requests` | Clear all captured requests in a bin | | DELETE | `/bins/:id` | Delete a bin | | ANY | `/b/:id` and `/b/:id/*` | Capture requests sent to a bin | | GET | `/healthz` | Check whether bin storage is reachable | ## Storage health `GET /healthz` is on the Node server and the Worker. This route does not create a bin. A memory store sends HTTP 200: ```json { "status": "ok", "bins": { "store": "memory", "connected": true, "latencyMs": 1, "uriPresent": false } } ``` The Worker uses MongoDB when `MONGODB_URI` is set. The check opens a client, sends an admin ping, and then closes the client. The timeout is short. The check does not keep the client after a failure. A successful ping sends HTTP 200. `store` is `mongo`. A failed ping sends HTTP 503: ```json { "status": "error", "bins": { "store": "mongo", "connected": false, "uriPresent": true, "uri": { "length": 78, "leadingWhitespace": false, "trailingWhitespace": false, "newline": false, "wrappedQuotes": false, "atCount": 2, "passwordReserved": ["@"], "passwordHasPercent": false }, "error": { "name": "MongoParseError", "message": "Invalid connection string. Percent-encode reserved characters in the username and password (@ : / ? # [ ] $).", "code": null } } } ``` A MongoDB result includes `bins.uri` on success and on failure. A memory result omits `bins.uri`. The response does not include the scheme, the host, the username, or the password length. `uri.passwordReserved` lists raw reserved characters in the password. The list is empty when the password has only reserved characters. `uri.passwordHasPercent` is true when the password contains `%`. The response does not contain the connection string or the password. The logs do not contain the connection string, the username, the password, or the host. `uriPresent` is a boolean. `Invalid connection string` is the driver text. MockHTTP adds the percent-encode hint only for that text or for `unescaped characters`. A DNS error stays a DNS error. `Invalid connection string` means that the URI has a second `@`. It also means that you did not encode a reserved character in the username or the password. Encode these characters: - `@` as `%40` - `:` as `%3A` - `/` as `%2F` - `?` as `%3F` - `#` as `%23` - `[` as `%5B` - `]` as `%5D` - `$` as `%24` A correct `mongodb+srv://` URI does not fail at parse time. A DNS failure or a network failure has a different error name. ## End-to-End Webhook Debugging Example A complete walkthrough using curl: ```bash BASE=http://localhost:3000 # Create the bin and grab its id ID=$(curl -s -X POST $BASE/bins | jq -r .id) echo "Bin URL: $BASE/b/$ID" # Simulate a Stripe webhook curl -s -X POST "$BASE/b/$ID/stripe/events?secret=whsec_test" \ -H 'content-type: application/json' \ -H 'stripe-signature: t=1700000000,v1=abc123' \ -d '{"id":"evt_1","type":"payment_intent.succeeded","data":{"object":{"amount":2000}}}' # Simulate a GitHub webhook curl -s -X POST "$BASE/b/$ID/github" \ -H 'content-type: application/json' \ -H 'x-github-event: pull_request' \ -d '{"action":"opened","number":42}' # Inspect everything that arrived curl -s "$BASE/bins/$ID/requests" | jq # Drill into the most recent one RID=$(curl -s "$BASE/bins/$ID/requests" | jq -r '.requests[0].id') curl -s "$BASE/bins/$ID/requests/$RID" | jq # { # "id": "f9c2e1a40b3d", # "binId": "abc123def456", # "method": "POST", # "url": "/github", # "path": "/github", # "query": {}, # "headers": { # "host": "localhost:3000", # "content-type": "application/json", # "x-github-event": "pull_request" # }, # "remoteAddress": "127.0.0.1", # "contentType": "application/json", # "bodySize": 32, # "body": "{\"action\":\"opened\",\"number\":42}", # "bodyEncoding": "utf8", # "truncated": false, # "capturedAt": "2026-05-18T12:00:01.234Z" # } # Clean up curl -s -X DELETE "$BASE/bins/$ID/requests" # clear captures, keep the bin curl -s -X DELETE "$BASE/bins/$ID" # delete the bin entirely ``` ## Captured Request Shape ```json { "id": "f9c2e1a40b3d", "binId": "abc123def456", "method": "POST", "url": "/webhook?source=stripe", "path": "/webhook", "query": { "source": "stripe" }, "headers": { "content-type": "application/json", "...": "..." }, "remoteAddress": "127.0.0.1", "contentType": "application/json", "bodySize": 32, "body": "{\"event\":\"payment.succeeded\"}", "bodyEncoding": "utf8", "truncated": false, "capturedAt": "2026-05-18T12:00:00.000Z" } ``` - **`url`** is the request URL relative to the bin (everything after `/b/:id`). - **`path`** is the sub-path only, without the query string. - **`bodyEncoding`** is `"utf8"` for text content types (text/*, application/json, application/xml, application/x-www-form-urlencoded, application/javascript), `"base64"` for everything else (binary payloads), or `"none"` when no body was sent. - **`truncated`** is `true` when the body exceeded `maxBodySize` and was cut off. `bodySize` reflects the original length. ## Body Encoding Examples ### Text Content (UTF-8) JSON, XML, form-encoded, plain text, and JavaScript are stored as UTF-8 strings so you can read them directly: ```bash curl -X POST "http://localhost:3000/b/$ID" \ -H 'content-type: application/json' \ -d '{"hello":"world"}' curl -s "http://localhost:3000/bins/$ID/requests" | jq '.requests[0] | {bodyEncoding, body}' # { # "bodyEncoding": "utf8", # "body": "{\"hello\":\"world\"}" # } ``` ### Binary Content (Base64) Any non-text content type is base64-encoded, preserving the bytes exactly: ```bash # Upload a PNG to the bin curl -X POST "http://localhost:3000/b/$ID/upload" \ -H 'content-type: image/png' \ --data-binary @logo.png curl -s "http://localhost:3000/bins/$ID/requests" | jq '.requests[0] | {bodyEncoding, bodySize}' # { # "bodyEncoding": "base64", # "bodySize": 14823 # } # Decode the body back to bytes curl -s "http://localhost:3000/bins/$ID/requests" \ | jq -r '.requests[0].body' | base64 -d > recovered.png ``` ### Truncation Bodies larger than `maxBodySize` (128 KiB by default) are cut off and flagged: ```javascript // In test setup import { MockHttp, MockHttpBins } from '@jaredwray/mockhttp'; const mock = new MockHttp(); mock.bins = new MockHttpBins({ maxBodySize: 1024 }); // 1 KiB cap await mock.start(); ``` ```bash # Send 5000 bytes to a bin with a 1 KiB cap head -c 5000 /dev/urandom | curl -X POST "http://localhost:3000/b/$ID" \ -H 'content-type: application/octet-stream' \ --data-binary @- curl -s "http://localhost:3000/bins/$ID/requests" | jq '.requests[0] | {bodySize, truncated, body_len: (.body | length)}' # { # "bodySize": 5000, ← original size # "truncated": true, # "body_len": 1368 ← base64 of the first 1024 bytes # } ``` ## FIFO Eviction Example Once a bin reaches `maxRequestsPerBin` captures (100 by default), the oldest ones are dropped: ```bash # Send 105 requests for i in $(seq 1 105); do curl -s -X POST "http://localhost:3000/b/$ID/event/$i" > /dev/null done # The bin holds the most recent 100; the first 5 are gone curl -s "http://localhost:3000/bins/$ID/requests" | jq '.requests | length' # 100 # Newest is at the top curl -s "http://localhost:3000/bins/$ID/requests" | jq '.requests[0].path' # "/event/105" ``` ## Programmatic Access Use `mock.bins` to control request bins from a test. You do not need an HTTP call: ```javascript import { MockHttp } from '@jaredwray/mockhttp'; const mock = new MockHttp({ logging: false }); await mock.start(); // Create a bin const bin = await mock.bins.createBin(); console.log(`Webhook target: http://localhost:${mock.port}/b/${bin.id}`); // ... point your code-under-test at that URL ... // Read captured requests (newest first) const requests = await mock.bins.getRequests(bin.id); console.log(`Captured ${requests.length} requests`); for (const req of requests) { console.log(`${req.method} ${req.path} (${req.bodySize} bytes)`); } // Clean up await mock.bins.deleteBin(bin.id); await mock.close(); ``` ### Using Bins in a Vitest Test ```typescript import { afterAll, beforeAll, expect, test } from 'vitest'; import { MockHttp } from '@jaredwray/mockhttp'; let mock: MockHttp; beforeAll(async () => { mock = new MockHttp({ logging: false }); await mock.start(); }); afterAll(async () => { await mock.close(); }); test('my SDK sends the right webhook payload', async () => { const bin = await mock.bins.createBin(); const webhookUrl = `http://localhost:${mock.port}/b/${bin.id}`; // Drive your SDK at the bin await mySdk.notify(webhookUrl, { event: 'user.created', id: 42 }); // Assert on what actually arrived const [captured] = await mock.bins.getRequests(bin.id); expect(captured.method).toBe('POST'); expect(captured.contentType).toBe('application/json'); expect(JSON.parse(captured.body!)).toEqual({ event: 'user.created', id: 42, }); expect(captured.headers['x-signature']).toBeDefined(); }); ``` ## Configuration Bins are enabled by default. To disable the routes entirely: ```javascript const mock = new MockHttp({ httpBin: { bins: false }, }); ``` To change the limits, replace the default `MockHttpBins` before you start the server: ```javascript import { MockHttp, MockHttpBins } from '@jaredwray/mockhttp'; const mock = new MockHttp(); mock.bins = new MockHttpBins({ defaultTtlMs: 60 * 60 * 1000, // 1 hour (default: 24h) maxRequestsPerBin: 500, // (default: 100) maxBodySize: 512 * 1024, // 512 KiB (default: 128 KiB) idLength: 16, // (default: 12) }); await mock.start(); ``` ### Defaults | Option | Default | Description | |--------|---------|-------------| | `defaultTtlMs` | `86400000` (24h) | Bin lifetime, set as the Keyv TTL. An expired bin returns 404. | | `maxRequestsPerBin` | `100` | When exceeded, oldest captures are dropped (FIFO). | | `maxBodySize` | `131072` (128 KiB) | Larger bodies are truncated; `truncated: true` is set on the capture. | | `idLength` | `12` | Length of generated bin and request ids. | | `keyv` | `new Keyv()` | Keyv store for bins. The default keeps bins in memory. | ### Storage `MockHttpBins` stores each bin in [Keyv](https://github.com/jaredwray/keyv) 6. The default is `new Keyv()`. That store keeps the data in memory for this process. Pass a Keyv 6 instance when you want a different adapter. Install the adapter in your project. This package does not include an adapter. `@keyv/redis` 6 matches this Keyv version. ```typescript import Keyv from 'keyv'; import KeyvRedis from '@keyv/redis'; // pnpm add @keyv/redis import { MockHttpBins } from '@jaredwray/mockhttp'; mock.bins = new MockHttpBins({ keyv: new Keyv({ store: new KeyvRedis('redis://localhost:6379') }), }); ``` Each capture writes the full bin again. A large body or a high request limit makes that write large. Set `maxBodySize` and `maxRequestsPerBin` to limit the size. With the defaults, a full bin of binary bodies is about 17 MB. Two processes that share one Keyv can lose a capture. This occurs when both processes write the same bin at the same time. If Keyv does not store a write, the bin route returns `500` with the standard Fastify error body: `statusCode`, `error`, and `message`. A failed read depends on the Keyv `error` listener. Without a listener, Keyv throws the store error and the route returns `500`. With a listener, Keyv does not throw. A failed read then looks like a missing bin, and the route returns `404`. `listBins()` returns only the bins that it read before the error. `listBins()` throws an error when the adapter has no iterator. An expired bin returns 404. The in-memory Keyv store deletes an expired bin only when a read or `listBins()` reaches it. Until then, the bin stays in memory. ### Configuration URL: https://mockhttp.org/docs/configuration/ # Rate Limiting MockHttp supports rate limiting using [@fastify/rate-limit](https://github.com/fastify/fastify-rate-limit). Rate limiting is **enabled by default** at **1000 requests per minute** with **localhost (127.0.0.1 and ::1) excluded** from rate limiting. ## Default Rate Limiting By default, MockHttp applies the following rate limit: - **1000 requests per minute** per IP address - **Localhost is excluded** - requests from 127.0.0.1 and ::1 bypass rate limiting (ideal for local development and testing) ```javascript import { MockHttp } from '@jaredwray/mockhttp'; const mock = new MockHttp(); await mock.start(); // Rate limiting is active (1000 req/min) except for localhost ``` ## Customizing Rate Limiting To customize rate limiting, pass a `rateLimit` configuration object when creating your MockHttp instance: ```javascript import { MockHttp } from '@jaredwray/mockhttp'; const mock = new MockHttp({ rateLimit: { max: 100, // Maximum 100 requests timeWindow: '1 minute' // Per 1 minute window } }); await mock.start(); ``` ## Common Configuration Options The `rateLimit` option accepts all [@fastify/rate-limit options](https://github.com/fastify/fastify-rate-limit#options): ### Basic Rate Limiting ```javascript // Limit to 50 requests per minute const mock = new MockHttp({ rateLimit: { max: 50, timeWindow: '1 minute' } }); ``` ### Stricter Limits with Custom Error Response ```javascript const mock = new MockHttp({ rateLimit: { max: 30, timeWindow: 60000, // 1 minute in milliseconds errorResponseBuilder: (req, context) => ({ statusCode: 429, error: 'Too Many Requests', message: `Rate limit exceeded. Try again in ${context.after}` }) } }); ``` ### Allow List (Exclude Specific IPs) ```javascript const mock = new MockHttp({ rateLimit: { max: 100, timeWindow: '1 minute', allowList: ['127.0.0.1', '192.168.1.100'] // These IPs bypass rate limiting } }); ``` ### Custom Key Generator (Rate Limit by Header) ```javascript const mock = new MockHttp({ rateLimit: { max: 100, timeWindow: '1 minute', keyGenerator: (request) => { // Rate limit by API key instead of IP return request.headers['x-api-key'] || request.ip; } } }); ``` ### Advanced Configuration ```javascript const mock = new MockHttp({ rateLimit: { global: true, // Apply to all routes max: 100, // Max requests timeWindow: '1 minute', // Time window cache: 10000, // Cache size for tracking clients skipOnError: false, // Don't skip on storage errors ban: 10, // Ban after 10 rate limit violations continueExceeding: false, // Don't reset window on each request enableDraftSpec: true, // Use IETF draft spec headers addHeaders: { // Customize rate limit headers 'x-ratelimit-limit': true, 'x-ratelimit-remaining': true, 'x-ratelimit-reset': true } } }); ``` ## Disabling Rate Limiting To disable rate limiting completely, set the `rateLimit` option to `false`: ```javascript const mock = new MockHttp({ rateLimit: false // Completely disable rate limiting }); await mock.start(); // No rate limiting is applied to any requests ``` **Note:** To change rate limiting settings after the server has started, you must restart the server: ```javascript const mock = new MockHttp(); await mock.start(); // Starts with default rate limiting // To change or disable rate limiting: await mock.close(); mock.rateLimit = undefined; // or set new options await mock.start(); // Restarts with new settings ``` ## Available Options | Option | Type | Default | Description | |--------|------|---------|-------------| | `max` | number \| function | `1000` | Maximum requests per time window | | `timeWindow` | number \| string | `60000` | Duration of rate limit window (milliseconds or string like '1 minute') | | `cache` | number | `5000` | LRU cache size for tracking clients | | `allowList` | array \| function | `[]` | IPs or function to exclude from rate limiting | | `keyGenerator` | function | IP-based | Function to generate unique client identifier | | `errorResponseBuilder` | function | Default 429 | Custom error response function | | `skipOnError` | boolean | `false` | Skip rate limiting if storage errors occur | | `ban` | number | `-1` | Ban client after N violations (disabled by default) | | `continueExceeding` | boolean | `false` | Renew time window on each request while limited | | `enableDraftSpec` | boolean | `false` | Use IETF draft specification headers | For the complete list of options, see the [@fastify/rate-limit documentation](https://github.com/fastify/fastify-rate-limit#options). # Logging MockHttp uses [Pino](https://github.com/pinojs/pino) for logging via Fastify's built-in logger. Logging is **enabled by default** but can be disabled when needed. ## Disabling Logging ```javascript import { MockHttp } from '@jaredwray/mockhttp'; const mock = new MockHttp({ logging: false }); await mock.start(); // Server runs silently without any log output ``` You can also disable logging via the `LOGGING` environment variable: ```bash LOGGING=false node your-app.js ``` # Flexible URL Matching MockHttp ignores trailing path segments that come after the parsable portion of a URL. This is useful when a client appends extra data to a known endpoint — instead of returning 404, MockHttp serves the closest matching route. For example, all of these are served by `/status/:code`: ``` GET /status/429 GET /status/429/ GET /status/429/foo GET /status/429/foo/bar ``` The rewrite preserves the query string and only triggers when a more specific route exists; URLs whose first path segment doesn't correspond to a registered route still return 404. ### Library API URL: https://mockhttp.org/docs/library/ # API Reference ## MockHttp Class ### Constructor ```javascript new MockHttp(options?) ``` **Parameters:** - `options?` (MockHttpOptions): - `port?`: number - The port to listen on (default: 3000) - `host?`: string - The host to listen on (default: '0.0.0.0') - `autoDetectPort?`: boolean - Auto-detect next available port if in use (default: true) - `helmet?`: boolean - Use Helmet for security headers (default: true) - `apiDocs?`: boolean - Serve the Docula documentation site and OpenAPI spec (default: true) - `siteDistPath?`: string - Path to the built Docula site (default: the package `site/dist` directory) - `rateLimit?`: RateLimitPluginOptions - Configure rate limiting (default: 1000 req/min, localhost excluded) - `logging?`: boolean - Enable logging (default: true) - `staticFiles?`: boolean - Serve files from the package `public/` directory (default: true) - `pluginTimeout?`: number - Fastify plugin boot timeout in milliseconds; `0` disables it (default: Fastify's timeout) - `httpBin?`: HttpBinOptions - Configure which httpbin routes to enable - `httpMethods?`: boolean - Enable HTTP method routes (default: true) - `redirects?`: boolean - Enable redirect routes (default: true) - `requestInspection?`: boolean - Enable request inspection routes (default: true) - `responseInspection?`: boolean - Enable response inspection routes (default: true) - `statusCodes?`: boolean - Enable status code routes (default: true) - `responseFormats?`: boolean - Enable response format routes (default: true) - `cookies?`: boolean - Enable cookie routes (default: true) - `anything?`: boolean - Enable anything routes (default: true) - `auth?`: boolean - Enable authentication routes (default: true) - `images?`: boolean - Enable image routes (default: true) - `bins?`: boolean - Enable request bin routes /bins and /b/:id (default: true) - `https?`: boolean | HttpsOptions - Enable HTTPS with auto-generated or custom certificates (default: undefined/disabled) - `http2?`: boolean - Enable HTTP/2 support (default: false) - `http1?`: boolean - Allow HTTP/1.1 fallback when using HTTP/2 with HTTPS (default: true) - `hookOptions?`: HookifiedOptions - Hookified options ### Properties - `port`: number - Get/set the server port - `host`: string - Get/set the server host - `autoDetectPort`: boolean - Get/set auto-detect port behavior - `helmet`: boolean - Get/set Helmet security headers - `apiDocs`: boolean - Get/set whether the documentation site and OpenAPI spec are served - `siteDistPath`: string - Get/set the path to the built Docula site - `logging`: boolean - Get/set logging enabled state - `staticFiles`: boolean - Get/set whether files from `public/` are served - `pluginTimeout`: number | undefined - Get/set Fastify plugin boot timeout - `rateLimit`: RateLimitPluginOptions | undefined - Get/set rate limiting options - `httpBin`: HttpBinOptions - Get/set httpbin route options - `https`: HttpsOptions | undefined - Get/set HTTPS configuration - `isHttps`: boolean - Whether the server is running with HTTPS - `http2`: boolean - Get/set HTTP/2 support - `http1`: boolean - Get/set HTTP/1.1 fallback for HTTP/2 with HTTPS - `server`: FastifyInstance - Get/set the Fastify server instance - `taps`: TapManager - Get/set the TapManager instance - `bins`: MockHttpBins - Get or set the request bins ### Methods #### `async initialize()` Register plugins and routes without listening. Use `server.inject()` afterwards, or call `start()` to bind a port. #### `async start()` Start the Fastify server. If already running, it will be closed and restarted. #### `async close()` Stop the Fastify server. #### `async detectPort()` Detect the next available port. **Returns:** number - The available port #### `async registerApiDocs(fastifyInstance?)` Register OpenAPI generation and the Docula documentation site. #### `async registerSwagger(fastifyInstance?)` Register `@fastify/swagger` and the live `/openapi.json` spec route. #### `async registerSite(fastifyInstance?)` Serve the built Docula site from `siteDistPath` when the directory exists. #### `async registerHttpMethods(fastifyInstance?)` Register HTTP method routes (GET, POST, PUT, PATCH, DELETE). #### `async registerStatusCodeRoutes(fastifyInstance?)` Register status code routes. #### `async registerRequestInspectionRoutes(fastifyInstance?)` Register request inspection routes (headers, ip, user-agent). #### `async registerResponseInspectionRoutes(fastifyInstance?)` Register response inspection routes (cache, etag, response-headers). #### `async registerResponseFormatRoutes(fastifyInstance?)` Register response format routes (json, xml, html, etc.). #### `async registerRedirectRoutes(fastifyInstance?)` Register redirect routes (absolute, relative, redirect-to). #### `async registerCookieRoutes(fastifyInstance?)` Register cookie routes (get, set, delete). #### `async registerAnythingRoutes(fastifyInstance?)` Register "anything" catch-all routes. #### `async registerAuthRoutes(fastifyInstance?)` Register authentication routes (basic, bearer, digest, hidden-basic). #### `async registerImageRoutes(fastifyInstance?)` Register image routes (jpeg, png, svg, webp) with content negotiation support. #### `async registerBinRoutes(fastifyInstance?)` Register the request bin routes. Management is at `/bins` and capture is at `/b/:id`. `GET /healthz` reports whether bin storage is reachable. ## Bins (Request Capture) Use `mockHttp.bins` to control request bins. See [Request Bins](#request-bins) for usage examples. ### `bins.createBin()` Create a new bin with the configured TTL. Throws when Keyv does not store the bin. **Returns:** `Promise` — `{ id, createdAt, expiresAt, requestCount }` ### `bins.getBin(id)` Look up a bin by id. Returns `undefined` if the bin does not exist or Keyv has expired it. When the Keyv instance has an `error` listener, a failed read also returns `undefined`. **Returns:** `Promise` ### `bins.listBins()` List the bins that Keyv still holds. **Returns:** `Promise` ### `bins.deleteBin(id)` Delete a bin and all its captured requests. The delete waits for captures already queued for that bin. **Returns:** `Promise` — `true` when the bin existed ### `bins.getRequests(binId)` List captured requests for a bin, newest first. **Returns:** `Promise` ### `bins.getRequest(binId, reqId)` Look up a single captured request. **Returns:** `Promise` ### `bins.clearRequests(binId)` Clear all captured requests in a bin. The bin stays. Throws when Keyv does not store the change. **Returns:** `Promise` — `false` when the bin does not exist ### `bins.recordRequest(binId, raw)` Manually record a captured request. Returns `undefined` if the bin does not exist. Throws when Keyv does not store the capture. Normally invoked by the capture route, but available for programmatic use. **Returns:** `Promise` ### `bins.maxBodySize` / `bins.maxRequestsPerBin` / `bins.defaultTtlMs` Read-only getters for the currently-configured limits. ## Taps (Response Injection) Access the TapManager via `mockHttp.taps` to inject custom responses. ### `taps.inject(response, matcher?)` Injects a custom response for requests matching the criteria. **Parameters:** - `response` (InjectionResponse | InjectionResponseFunction): - **Static Response** (InjectionResponse): - `response`: string | object | Buffer - The response body - `statusCode?`: number - HTTP status code (default: 200) - `headers?`: object - Response headers - **Function Response** (InjectionResponseFunction): - A function that receives the Fastify request object and returns an InjectionResponse - `(request: FastifyRequest) => InjectionResponse` - Allows dynamic response generation based on request properties (url, method, headers, etc.) - `matcher?` (InjectionMatcher) - Optional matching criteria: - `url?`: string - URL path (supports wildcards with `*`) - `method?`: string - HTTP method (GET, POST, etc.) - `hostname?`: string - Hostname to match - `headers?`: object - Headers that must be present **Returns:** `InjectionTap` - A tap object with a unique `id` that can be used to remove the injection ## `taps.removeInjection(tapOrId)` Removes an injection. **Parameters:** - `tapOrId`: InjectionTap | string - The tap object or tap ID to remove **Returns:** boolean - `true` if removed, `false` if not found ### `taps.injections` A getter that returns a Map of all active injection taps. **Returns:** `Map` - Map of all active injections with tap IDs as keys ## `taps.clear()` Removes all injections. ## `taps.hasInjections` A getter that returns whether there are any active injections. **Returns:** boolean - `true` if there are active injections, `false` otherwise ### MockHttp.org Live URL: https://mockhttp.org/docs/hosted/ # About mockhttp.org [mockhttp.org](https://mockhttp.org) is a free hosted instance of this codebase for testing. It runs on a [Cloudflare Worker](/docs/how-to-deploy/cloudflare/) (no containers): documentation is served from Workers Assets, and mock APIs such as `/get` and `/post` run in the Worker. The service is globally available and rate-limited (1000 requests per minute per IP) to prevent abuse. Request bins on this service are stored in MongoDB Atlas, in the `bins` collection, so they are shared across isolates. All [mockhttp.org](https://mockhttp.org) traffic stays on Cloudflare. A separate test app runs the Node server on [Wasmer Edge](/docs/how-to-deploy/wasmer/) at [mockhttp.wasmer.app](https://mockhttp.wasmer.app). Getting Started is served at `/` and `/docs`, other guides at `/docs/...`, and the interactive HTTP API reference at `/api`. Mock endpoints such as `/get` and `/post` are unchanged. ### Cloudflare URL: https://mockhttp.org/docs/how-to-deploy/cloudflare/ Description: Deploy MockHTTP as a Cloudflare Worker. Workers Assets serve the docs site, and the Worker handles mock API routes. # Deploy on Cloudflare MockHTTP runs on Cloudflare as a Worker, not a container. [mockhttp.org](https://mockhttp.org) is this deployment: [Workers Assets](https://developers.cloudflare.com/workers/static-assets/) serve the documentation site, and the Worker handles mock APIs such as `/get` and `/post`. The Worker entry is [`worker/index.ts`](https://github.com/jaredwray/mockhttp/blob/main/worker/index.ts). It listens with the Node.js compatibility layer and forwards each request into the Fastify app. Configuration lives in [`wrangler.jsonc`](https://github.com/jaredwray/mockhttp/blob/main/wrangler.jsonc). ## What the Worker does differently The Worker starts the same MockHTTP app as Node.js, with a few options set for the Workers runtime: | Option | Worker value | Why | | --- | --- | --- | | `rateLimit` | `false` | [`@fastify/rate-limit`](https://github.com/fastify/fastify-rate-limit) is off. A Cloudflare rate limiting binding allows 1000 requests per 60 seconds per IP. | | `siteDistPath` | unused path | Fastify does not serve the docs. Workers Assets serve `site/dist`. | | `staticFiles` | `false` | Logos and other `public/` files are copied into `site/dist` and read through the `ASSETS` binding. | | `pluginTimeout` | `0` | Disables Fastify's plugin boot timeout. Those timers are unreliable on Workers. | | `logging` | `false` | Request logging is off. | | `autoDetectPort` | `false` | The app always listens on port 3000 inside the isolate. | The rate limiter key is the `cf-connecting-ip` header, then the first address in `x-forwarded-for`, then `unknown`. A limited request returns `429` with `retry-after: 60`. That limiter is shared across isolates. Bins stay in memory in the isolate when `MONGODB_URI` is not set. A bin from one request can be absent when a different isolate handles the next request. When `MONGODB_URI` is set, bins are stored in MongoDB. Each request opens its own client on its first bin operation and closes it after the response, through `ctx.waitUntil`. No client is shared between requests: workerd rejects I/O on a socket that a different request opened, and a shared client made bin requests fail with error 1101. It does not connect while the isolate starts. Each bin request therefore pays one connection setup, which is a few round trips to Atlas. Percent-encode reserved characters in the username and the password. `@` is `%40`. An unencoded `@` makes the driver throw `Invalid connection string` before it contacts Atlas. `GET /healthz` reports the bin store. A successful admin ping returns HTTP 200 and `bins.connected: true`. A failed ping returns HTTP 503 with the driver error name, a redacted message, and a code. The body has `uriPresent` (boolean). It does not have the scheme. On the Node server, this route reports the memory store. When `MONGODB_URI` is set, `bins.uri` has the URI length and the `@` count. It also has flags for whitespace, a newline, and quote marks. It does not have the host, the username, or the password length. The body does not have the password or the full URI. The percent-encode hint is added only for `Invalid connection string` or `unescaped characters`. A DNS error keeps the driver text. `uri.passwordReserved` is empty when the password has only reserved characters. Worker logs still omit the URI, the username, the password, and the host. Taps are a library API (`mock.taps.inject`). They have no HTTP routes, so a deployed Worker has no way to inject one. Assets are checked before the Worker. A file under `site/dist` (the docs site, favicon, logos) is served as a static asset. A path that is not a file, such as `/get` or `/post`, is handled by the Worker. ## Deploy your own Worker You need a Cloudflare account and permission to deploy Workers. This repository pins Wrangler to `4.127.0`. Change `name` and `routes` in `wrangler.jsonc` before you deploy a fork. The route in this repo attaches the custom domain `mockhttp.org`. `workers_dev` is enabled, so a `*.workers.dev` hostname is available as well. Adjust the `RATE_LIMITER` binding if you want a different limit than 1000 requests per 60 seconds. Also change `siteUrl` in `site/docula.config.ts`. The sitemap is a static file, and this repo sets it to `https://mockhttp.org`. The `migrations` block records a container class that this Worker no longer uses. A brand-new Worker can omit that block. Wrangler bundles `worker/index.ts` from source, so you do not need `pnpm build` for this deploy. `pnpm website:build` produces `site/dist`. ```bash pnpm install pnpm website:build pnpm prepare:worker-assets npx wrangler@4.127.0 deploy ``` `pnpm prepare:worker-assets` copies `public/` into `site/dist` so favicon and logo files ship with the docs site. Wrangler reads `CLOUDFLARE_API_TOKEN` and `CLOUDFLARE_ACCOUNT_ID` from the environment when you are not logged in locally. After deploy, open the workers.dev hostname or your custom domain and request `/get`. The docs are at `/docs`, and the OpenAPI reference is at `/api`. ## Deploy from GitHub Actions [`.github/workflows/deploy-site.yaml`](https://github.com/jaredwray/mockhttp/blob/main/.github/workflows/deploy-site.yaml) deploys this Worker on the `released` event (a published release, not a prerelease) and when the workflow is started by hand. The `production` environment provides `CLOUDFLARE_API_TOKEN` and `CLOUDFLARE_ACCOUNT_ID`. The deploy job installs production dependencies, downloads the built site, copies `public/` into `site/dist`, installs Wrangler `4.127.0`, and runs `wrangler deploy`. That workflow does not deploy the [Wasmer](/docs/how-to-deploy/wasmer/) app. Docker image publishing is a separate workflow, documented in [Docker](/docs/how-to-deploy/docker/). ### Docker URL: https://mockhttp.org/docs/how-to-deploy/docker/ Description: Run MockHTTP from the jaredwray/mockhttp image, with Docker Compose, or by building the image from this repository. # Deploy with Docker The published image is [`jaredwray/mockhttp`](https://hub.docker.com/r/jaredwray/mockhttp) on Docker Hub. It runs the Node.js server and the documentation site in one container. The `latest` tag is `linux/amd64` only. Apple Silicon runs it under emulation. On arm64 Linux, build the image from this repository instead. ## Run the image ```bash docker run -d -p 3000:3000 jaredwray/mockhttp ``` The server listens on port 3000. Open `http://localhost:3000/get` for a mock response, `http://localhost:3000/docs` for these guides, and `http://localhost:3000/api` for the OpenAPI reference. `pnpm docker:run` is `docker run -p 3000:3000 jaredwray/mockhttp`. It stays in the foreground. Docker pulls the Hub image when it is not already local. Rate limiting is on: 1000 requests per minute. The allow list is only `127.0.0.1` and `::1`. A published port delivers traffic from the Docker bridge address, not from loopback inside the container, so those requests count against the limit. None of the environment variables below turn it off. Change or disable it with the library [`rateLimit` option](/docs/configuration/). A test suite that sends more than 1000 requests a minute to the published port will get `429` responses. ## Docker Compose ```yaml services: mockhttp: image: jaredwray/mockhttp:latest ports: - "3000:3000" ``` The Compose file in this repository publishes port 3001 and sets `PORT` so the process listens on that same port: ```yaml services: mockhttp: image: jaredwray/mockhttp:latest ports: - "3001:3001" environment: - PORT=3001 ``` `pnpm docker:compose:up` and `pnpm docker:compose:down` call the `docker-compose` binary. Current Docker installs often provide `docker compose` instead, which you can run against the same file. ## Environment variables The container starts `node dist/index.mjs`. That process reads these variables: | Variable | Default | Effect | | --- | --- | --- | | `PORT` | `3000` | Port the server listens on. Match it to the published container port. | | `HOST` | `0.0.0.0` | Bind address. | | `LOGGING` | enabled | Set to `false` to turn logging off. | | `HTTP2` | off | Set to `true` to enable HTTP/2 cleartext (h2c). The image does not load a TLS certificate. | | `AUTO_DETECT_PORT` | `true` | Set to `false` to keep `PORT` even when that port is already in use. | HTTPS certificates are configured in the [library](/docs/https/), not through container environment variables. Put a TLS proxy in front of the container when you need HTTPS. ## Build the image The [`Dockerfile`](https://github.com/jaredwray/mockhttp/blob/main/Dockerfile) copies `node_modules`, `package.json`, `public/`, `dist/`, and `site/dist/` from the build context. Build the package and the docs site before `docker build`. ```bash pnpm install pnpm build pnpm website:build docker build -t jaredwray/mockhttp . docker run -d -p 3000:3000 jaredwray/mockhttp ``` `pnpm docker:build` is the `docker build` step. The image is based on Node.js 24 Alpine, runs as the `node` user, exposes port 3000, and starts `node dist/index.mjs`. ## Publish to Docker Hub [`.github/workflows/docker-publish.yaml`](https://github.com/jaredwray/mockhttp/blob/main/.github/workflows/docker-publish.yaml) runs on the `released` event (a published release, not a prerelease) and when the workflow is started by hand. It builds `jaredwray/mockhttp:` and `jaredwray/mockhttp:latest` with `docker build` on `ubuntu-latest`, pushes both tags, and updates the Docker Hub description from `DOCKER.md`. That build is `linux/amd64`. The same Node server can run on [Wasmer Edge](/docs/how-to-deploy/wasmer/). The public site at [mockhttp.org](https://mockhttp.org) is the [Cloudflare Worker](/docs/how-to-deploy/cloudflare/), not this image. ### Wasmer URL: https://mockhttp.org/docs/how-to-deploy/wasmer/ Description: Deploy the MockHTTP Node.js server to Wasmer Edge with app.yaml, Anybuild, and wasmer deploy. # Deploy on Wasmer Wasmer Edge runs the same Node.js server as [Docker](/docs/how-to-deploy/docker/). The test app for this repository is [mockhttp.wasmer.app](https://mockhttp.wasmer.app). This deploy does not publish the [Cloudflare Worker](/docs/how-to-deploy/cloudflare/). [mockhttp.org](https://mockhttp.org) stays on Cloudflare. ## App configuration [`app.yaml`](https://github.com/jaredwray/mockhttp/blob/main/app.yaml) describes the Edge app: ```yaml kind: wasmer.io/App.v0 name: mockhttp owner: jaredwray package: . env: HOST: "0.0.0.0" LOGGING: "false" AUTO_DETECT_PORT: "false" ``` `package: .` deploys the repository directory. `HOST` binds the server on all interfaces. Logging is off. Wasmer injects `PORT`. `AUTO_DETECT_PORT=false` keeps that port instead of scanning for another one. Change `name` and `owner` before you deploy your own app. The environment variables are the same ones the Docker image reads (`PORT`, `HOST`, `LOGGING`, `HTTP2`, and `AUTO_DETECT_PORT`). See [Docker](/docs/how-to-deploy/docker/) for what each one does. ## Build with Anybuild [`Anybuild`](https://github.com/jaredwray/mockhttp/blob/main/Anybuild) tells Wasmer how to build the package on a remote builder: - Node.js 24 and pnpm `12.12.1` - Build command: `pnpm run build && pnpm website:build` - Start command: `node dist/index.mjs` The build command produces `dist/` and `site/dist/` while Docula is still installed. Wasmer then prunes dev dependencies. The docs site has to exist before that prune, because Docula is a dev dependency. ## Deploy from the CLI Install the [Wasmer CLI](https://docs.wasmer.io/install) and log in, then from the repository root: ```bash wasmer deploy --build-remote ``` `--build-remote` uploads the source and runs the Anybuild file on Wasmer's builders. When the deploy finishes, the CLI prints the app URL. ## Deploy from GitHub Actions [`.github/workflows/deploy-wasmer.yaml`](https://github.com/jaredwray/mockhttp/blob/main/.github/workflows/deploy-wasmer.yaml) runs on the `released` event (a published release, not a prerelease) and when the workflow is started by hand. The `wasmer` environment provides `WASMER_TOKEN`. The deploy step runs: ```bash wasmer deploy --non-interactive --build-remote ``` ## Runtime behavior Bins use `new Keyv()` by default. The store keeps each bin in memory on the instance that created it. Give `MockHttpBins` a shared Keyv when bins must be visible on more than one instance. Two processes can lose a capture when they write the same bin at the same time. Taps are a library API (`mock.taps.inject`) and have no HTTP routes, so a deployed app cannot inject one. `@fastify/rate-limit` is on at 1000 requests per minute. It keys on the address that connects to the process. The server does not trust proxy headers, and the allow list is only `127.0.0.1` and `::1`. On the test app, `/ip` reports `127.0.0.100`, which is the edge proxy rather than the caller, and the response includes `x-ratelimit-limit: 1000`. Clients that share that proxy address share one limit on that instance. This is not the Cloudflare limiter used by [mockhttp.org](https://mockhttp.org). The process listens with HTTP. Wasmer terminates TLS for the `*.wasmer.app` hostname. ## API Reference URL: https://mockhttp.org/api OpenAPI Spec Source: /home/runner/work/mockhttp/mockhttp/site/api/swagger.json { "openapi": "3.0.3", "info": { "title": "Mock HTTP API", "description": "\nA simple HTTP server that can be used to mock HTTP responses for testing purposes. Inspired by [httpbin](https://httpbin.org/) and built using `nodejs` and `fastify` with the idea of running it via https://mockhttp.org, via docker `jaredwray/mockhttp`, or nodejs `npm install @jaredwray/mockhttp`.\n\n* [GitHub Repository](https://github.com/jaredwray/mockhttp)\n* [Docker Image](https://hub.docker.com/r/jaredwray/mockhttp)\n* [NPM Package](https://www.npmjs.com/package/@jaredwray/mockhttp)\n\n# About mockhttp.org\n\n[mockhttp.org](https://mockhttp.org) is a free hosted instance of this codebase for testing. It runs on a Cloudflare Worker (no containers): documentation is served from Workers Assets, and mock APIs such as `/get` and `/post` run in the Worker. The service is globally available and rate-limited (1000 requests per minute per IP) to prevent abuse.\n", "version": "3.0.2" }, "components": { "schemas": {} }, "paths": { "/healthz": { "get": { "tags": [ "Health" ], "description": "Report whether bin storage is reachable. MongoDB failures include the driver error. The scheme, the host, the username, the password, the password length, and the full URI are never returned.", "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "ok" ] }, "bins": { "type": "object", "properties": { "store": { "type": "string", "enum": [ "mongo", "memory" ] }, "connected": { "type": "boolean" }, "latencyMs": { "type": "integer" }, "uriPresent": { "type": "boolean" }, "uri": { "type": "object", "properties": { "length": { "type": "integer" }, "leadingWhitespace": { "type": "boolean" }, "trailingWhitespace": { "type": "boolean" }, "newline": { "type": "boolean" }, "wrappedQuotes": { "type": "boolean" }, "atCount": { "type": "integer" }, "passwordReserved": { "type": "array", "items": { "type": "string" } }, "passwordHasPercent": { "type": "boolean" } }, "required": [ "length", "leadingWhitespace", "trailingWhitespace", "newline", "wrappedQuotes", "atCount", "passwordReserved", "passwordHasPercent" ] } }, "required": [ "store", "connected", "latencyMs", "uriPresent" ] } }, "required": [ "status", "bins" ] } } } }, "503": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "error" ] }, "bins": { "type": "object", "properties": { "store": { "type": "string", "enum": [ "mongo", "memory" ] }, "connected": { "type": "boolean" }, "latencyMs": { "type": "integer" }, "uriPresent": { "type": "boolean" }, "uri": { "type": "object", "properties": { "length": { "type": "integer" }, "leadingWhitespace": { "type": "boolean" }, "trailingWhitespace": { "type": "boolean" }, "newline": { "type": "boolean" }, "wrappedQuotes": { "type": "boolean" }, "atCount": { "type": "integer" }, "passwordReserved": { "type": "array", "items": { "type": "string" } }, "passwordHasPercent": { "type": "boolean" } }, "required": [ "length", "leadingWhitespace", "trailingWhitespace", "newline", "wrappedQuotes", "atCount", "passwordReserved", "passwordHasPercent" ] }, "error": { "type": "object", "properties": { "name": { "type": "string" }, "message": { "type": "string" }, "code": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "object", "nullable": true, "enum": [ null ] } ] } }, "required": [ "name", "message", "code" ] } }, "required": [ "store", "connected", "uriPresent", "error" ] } }, "required": [ "status", "bins" ] } } } } } } }, "/get": { "get": { "tags": [ "HTTP Methods" ], "description": "Returns request information for GET requests", "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "method": { "type": "string" }, "headers": { "type": "object", "additionalProperties": { "type": "string" } }, "queryParams": { "type": "object", "additionalProperties": { "type": "string" } } }, "required": [ "method", "headers", "queryParams" ] } } } } } } }, "/post": { "post": { "tags": [ "HTTP Methods" ], "description": "Handles a POST request and returns request information", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "description": "The body of the POST request" } } }, "description": "The body of the POST request" }, "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "method": { "type": "string" }, "headers": { "type": "object", "additionalProperties": { "type": "string" } }, "body": { "type": "object", "additionalProperties": true } }, "required": [ "method", "headers", "body" ] } } } } } } }, "/delete": { "delete": { "tags": [ "HTTP Methods" ], "description": "Handles a DELETE request and returns request information", "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "method": { "type": "string" }, "headers": { "type": "object", "additionalProperties": { "type": "string" } }, "body": { "oneOf": [ { "type": "object", "additionalProperties": true }, { "type": "string" }, { "type": "object", "nullable": true, "enum": [ null ] } ] } }, "required": [ "method", "headers" ] } } } } } } }, "/put": { "put": { "tags": [ "HTTP Methods" ], "description": "Handles a PUT request and returns request information", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "description": "The body of the PUT request" } } }, "description": "The body of the PUT request" }, "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "method": { "type": "string" }, "headers": { "type": "object", "additionalProperties": { "type": "string" } }, "body": { "type": "object", "additionalProperties": true } }, "required": [ "method", "headers", "body" ] } } } } } } }, "/patch": { "patch": { "tags": [ "HTTP Methods" ], "description": "Handles a PATCH request and returns request information", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "description": "The body of the PATCH request" } } }, "description": "The body of the PATCH request" }, "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "method": { "type": "string" }, "headers": { "type": "object", "additionalProperties": { "type": "string" } }, "body": { "type": "object", "additionalProperties": true } }, "required": [ "method", "headers", "body" ] } } } } } } }, "/status/{code}?": { "get": { "tags": [ "Status Codes" ], "description": "Return status code or random status code if more than one are given ", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "code", "required": true, "description": "HTTP status code to be returned" } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" } } } } } } } }, "post": { "tags": [ "Status Codes" ], "description": "Return status code or random status code if more than one are given ", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "code", "required": true, "description": "HTTP status code to be returned" } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" } } } } } } } }, "put": { "tags": [ "Status Codes" ], "description": "Return status code or random status code if more than one are given ", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "code", "required": true, "description": "HTTP status code to be returned" } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" } } } } } } } }, "patch": { "tags": [ "Status Codes" ], "description": "Return status code or random status code if more than one are given ", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "code", "required": true, "description": "HTTP status code to be returned" } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" } } } } } } } }, "delete": { "tags": [ "Status Codes" ], "description": "Return status code or random status code if more than one are given ", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "code", "required": true, "description": "HTTP status code to be returned" } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" } } } } } } } } }, "/ip": { "get": { "tags": [ "Request Inspection" ], "description": "Returns the IP address of the client", "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "ip": { "type": "string", "description": "The IP address of the client" } }, "required": [ "ip" ] } } } } } } }, "/headers": { "get": { "tags": [ "Request Inspection" ], "description": "Returns all headers of the client request", "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "headers": { "type": "object", "additionalProperties": { "type": "string" }, "description": "All headers of the client request" } }, "required": [ "headers" ] } } } } } } }, "/user-agent": { "get": { "tags": [ "Request Inspection" ], "description": "Returns the User-Agent header of the client request", "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "userAgent": { "type": "string", "description": "The User-Agent header of the client request" } }, "required": [ "userAgent" ] } } } } } } }, "/cache": { "get": { "tags": [ "Response Inspection" ], "description": "Handles cache validation and retrieval.", "responses": { "200": { "description": "The cached content or resource.", "content": { "application/json": { "schema": { "type": "string", "description": "The cached content or resource." } } } }, "304": { "description": "Indicates the resource has not been modified." } } } }, "/cache/{value}": { "get": { "tags": [ "Response Inspection" ], "description": "Sets a Cache-Control header for n seconds.", "parameters": [ { "schema": { "type": "integer" }, "in": "path", "name": "value", "required": true, "description": "Number of seconds to cache the resource." } ], "responses": { "200": { "description": "Confirmation message for setting cache.", "content": { "application/json": { "schema": { "type": "string", "description": "Confirmation message for setting cache." } } } } } } }, "/etag/{etag}": { "get": { "tags": [ "Response Inspection" ], "description": "Handles ETag-based conditional requests.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "etag", "required": true, "description": "The ETag value for the resource." } ], "responses": { "200": { "description": "Resource content for matching ETag.", "content": { "application/json": { "schema": { "type": "string", "description": "Resource content for matching ETag." } } } }, "304": { "description": "Indicates the resource has not been modified." }, "412": { "description": "Indicates a precondition failed due to mismatched ETag." } } } }, "/response-headers": { "get": { "tags": [ "Response Inspection" ], "description": "Returns a set of response headers based on the query string.", "parameters": [ { "schema": "object", "in": "query", "name": "type" }, { "schema": true, "in": "query", "name": "additionalProperties" }, { "schema": "Freeform query string parameters to be added as response headers.", "in": "query", "name": "description" } ], "responses": { "200": { "description": "Response headers as per query string parameters.", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "description": "Response headers as per query string parameters." } } } } } }, "post": { "tags": [ "Response Inspection" ], "description": "Returns a set of response headers based on the query string.", "parameters": [ { "schema": "object", "in": "query", "name": "type" }, { "schema": true, "in": "query", "name": "additionalProperties" }, { "schema": "Freeform query string parameters to be added as response headers.", "in": "query", "name": "description" } ], "responses": { "200": { "description": "Response headers as per query string parameters.", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "description": "Response headers as per query string parameters." } } } } } } }, "/plain/{index}?": { "get": { "tags": [ "Response Formats" ], "description": "Returns plain text content. A random template is selected unless a 1-based template index is provided (e.g. /plain/1) for stable output.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "index", "required": true, "description": "Optional 1-based template index for stable, repeatable output. Omit for a random template." } ], "responses": { "200": { "description": "Plain text content", "content": { "application/json": { "schema": { "type": "string", "description": "Plain text content" } } } }, "404": { "description": "The requested template index does not exist", "content": { "application/json": { "schema": { "type": "object", "description": "The requested template index does not exist", "properties": { "error": { "type": "string" } } } } } } } }, "post": { "tags": [ "Response Formats" ], "description": "Returns plain text content. A random template is selected unless a 1-based template index is provided (e.g. /plain/1) for stable output.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "index", "required": true, "description": "Optional 1-based template index for stable, repeatable output. Omit for a random template." } ], "responses": { "200": { "description": "Plain text content", "content": { "application/json": { "schema": { "type": "string", "description": "Plain text content" } } } }, "404": { "description": "The requested template index does not exist", "content": { "application/json": { "schema": { "type": "object", "description": "The requested template index does not exist", "properties": { "error": { "type": "string" } } } } } } } }, "put": { "tags": [ "Response Formats" ], "description": "Returns plain text content. A random template is selected unless a 1-based template index is provided (e.g. /plain/1) for stable output.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "index", "required": true, "description": "Optional 1-based template index for stable, repeatable output. Omit for a random template." } ], "responses": { "200": { "description": "Plain text content", "content": { "application/json": { "schema": { "type": "string", "description": "Plain text content" } } } }, "404": { "description": "The requested template index does not exist", "content": { "application/json": { "schema": { "type": "object", "description": "The requested template index does not exist", "properties": { "error": { "type": "string" } } } } } } } }, "patch": { "tags": [ "Response Formats" ], "description": "Returns plain text content. A random template is selected unless a 1-based template index is provided (e.g. /plain/1) for stable output.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "index", "required": true, "description": "Optional 1-based template index for stable, repeatable output. Omit for a random template." } ], "responses": { "200": { "description": "Plain text content", "content": { "application/json": { "schema": { "type": "string", "description": "Plain text content" } } } }, "404": { "description": "The requested template index does not exist", "content": { "application/json": { "schema": { "type": "object", "description": "The requested template index does not exist", "properties": { "error": { "type": "string" } } } } } } } }, "delete": { "tags": [ "Response Formats" ], "description": "Returns plain text content. A random template is selected unless a 1-based template index is provided (e.g. /plain/1) for stable output.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "index", "required": true, "description": "Optional 1-based template index for stable, repeatable output. Omit for a random template." } ], "responses": { "200": { "description": "Plain text content", "content": { "application/json": { "schema": { "type": "string", "description": "Plain text content" } } } }, "404": { "description": "The requested template index does not exist", "content": { "application/json": { "schema": { "type": "object", "description": "The requested template index does not exist", "properties": { "error": { "type": "string" } } } } } } } } }, "/text/{index}?": { "get": { "tags": [ "Response Formats" ], "description": "Returns text content. A random template is selected unless a 1-based template index is provided (e.g. /text/1) for stable output.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "index", "required": true, "description": "Optional 1-based template index for stable, repeatable output. Omit for a random template." } ], "responses": { "200": { "description": "Text content", "content": { "application/json": { "schema": { "type": "string", "description": "Text content" } } } }, "404": { "description": "The requested template index does not exist", "content": { "application/json": { "schema": { "type": "object", "description": "The requested template index does not exist", "properties": { "error": { "type": "string" } } } } } } } }, "post": { "tags": [ "Response Formats" ], "description": "Returns text content. A random template is selected unless a 1-based template index is provided (e.g. /text/1) for stable output.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "index", "required": true, "description": "Optional 1-based template index for stable, repeatable output. Omit for a random template." } ], "responses": { "200": { "description": "Text content", "content": { "application/json": { "schema": { "type": "string", "description": "Text content" } } } }, "404": { "description": "The requested template index does not exist", "content": { "application/json": { "schema": { "type": "object", "description": "The requested template index does not exist", "properties": { "error": { "type": "string" } } } } } } } }, "put": { "tags": [ "Response Formats" ], "description": "Returns text content. A random template is selected unless a 1-based template index is provided (e.g. /text/1) for stable output.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "index", "required": true, "description": "Optional 1-based template index for stable, repeatable output. Omit for a random template." } ], "responses": { "200": { "description": "Text content", "content": { "application/json": { "schema": { "type": "string", "description": "Text content" } } } }, "404": { "description": "The requested template index does not exist", "content": { "application/json": { "schema": { "type": "object", "description": "The requested template index does not exist", "properties": { "error": { "type": "string" } } } } } } } }, "patch": { "tags": [ "Response Formats" ], "description": "Returns text content. A random template is selected unless a 1-based template index is provided (e.g. /text/1) for stable output.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "index", "required": true, "description": "Optional 1-based template index for stable, repeatable output. Omit for a random template." } ], "responses": { "200": { "description": "Text content", "content": { "application/json": { "schema": { "type": "string", "description": "Text content" } } } }, "404": { "description": "The requested template index does not exist", "content": { "application/json": { "schema": { "type": "object", "description": "The requested template index does not exist", "properties": { "error": { "type": "string" } } } } } } } }, "delete": { "tags": [ "Response Formats" ], "description": "Returns text content. A random template is selected unless a 1-based template index is provided (e.g. /text/1) for stable output.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "index", "required": true, "description": "Optional 1-based template index for stable, repeatable output. Omit for a random template." } ], "responses": { "200": { "description": "Text content", "content": { "application/json": { "schema": { "type": "string", "description": "Text content" } } } }, "404": { "description": "The requested template index does not exist", "content": { "application/json": { "schema": { "type": "object", "description": "The requested template index does not exist", "properties": { "error": { "type": "string" } } } } } } } } }, "/html/{index}?": { "get": { "tags": [ "Response Formats" ], "description": "Returns HTML content. A random template is selected unless a 1-based template index is provided (e.g. /html/1) for stable output.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "index", "required": true, "description": "Optional 1-based template index for stable, repeatable output. Omit for a random template." } ], "responses": { "200": { "description": "HTML content", "content": { "application/json": { "schema": { "type": "string", "description": "HTML content" } } } }, "404": { "description": "The requested template index does not exist", "content": { "application/json": { "schema": { "type": "object", "description": "The requested template index does not exist", "properties": { "error": { "type": "string" } } } } } } } }, "post": { "tags": [ "Response Formats" ], "description": "Returns HTML content. A random template is selected unless a 1-based template index is provided (e.g. /html/1) for stable output.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "index", "required": true, "description": "Optional 1-based template index for stable, repeatable output. Omit for a random template." } ], "responses": { "200": { "description": "HTML content", "content": { "application/json": { "schema": { "type": "string", "description": "HTML content" } } } }, "404": { "description": "The requested template index does not exist", "content": { "application/json": { "schema": { "type": "object", "description": "The requested template index does not exist", "properties": { "error": { "type": "string" } } } } } } } }, "put": { "tags": [ "Response Formats" ], "description": "Returns HTML content. A random template is selected unless a 1-based template index is provided (e.g. /html/1) for stable output.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "index", "required": true, "description": "Optional 1-based template index for stable, repeatable output. Omit for a random template." } ], "responses": { "200": { "description": "HTML content", "content": { "application/json": { "schema": { "type": "string", "description": "HTML content" } } } }, "404": { "description": "The requested template index does not exist", "content": { "application/json": { "schema": { "type": "object", "description": "The requested template index does not exist", "properties": { "error": { "type": "string" } } } } } } } }, "patch": { "tags": [ "Response Formats" ], "description": "Returns HTML content. A random template is selected unless a 1-based template index is provided (e.g. /html/1) for stable output.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "index", "required": true, "description": "Optional 1-based template index for stable, repeatable output. Omit for a random template." } ], "responses": { "200": { "description": "HTML content", "content": { "application/json": { "schema": { "type": "string", "description": "HTML content" } } } }, "404": { "description": "The requested template index does not exist", "content": { "application/json": { "schema": { "type": "object", "description": "The requested template index does not exist", "properties": { "error": { "type": "string" } } } } } } } }, "delete": { "tags": [ "Response Formats" ], "description": "Returns HTML content. A random template is selected unless a 1-based template index is provided (e.g. /html/1) for stable output.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "index", "required": true, "description": "Optional 1-based template index for stable, repeatable output. Omit for a random template." } ], "responses": { "200": { "description": "HTML content", "content": { "application/json": { "schema": { "type": "string", "description": "HTML content" } } } }, "404": { "description": "The requested template index does not exist", "content": { "application/json": { "schema": { "type": "object", "description": "The requested template index does not exist", "properties": { "error": { "type": "string" } } } } } } } } }, "/xml/{index}?": { "get": { "tags": [ "Response Formats" ], "description": "Returns XML content. A random template is selected unless a 1-based template index is provided (e.g. /xml/1) for stable output.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "index", "required": true, "description": "Optional 1-based template index for stable, repeatable output. Omit for a random template." } ], "responses": { "200": { "description": "XML content", "content": { "application/json": { "schema": { "type": "string", "description": "XML content" } } } }, "404": { "description": "The requested template index does not exist", "content": { "application/json": { "schema": { "type": "object", "description": "The requested template index does not exist", "properties": { "error": { "type": "string" } } } } } } } }, "post": { "tags": [ "Response Formats" ], "description": "Returns XML content. A random template is selected unless a 1-based template index is provided (e.g. /xml/1) for stable output.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "index", "required": true, "description": "Optional 1-based template index for stable, repeatable output. Omit for a random template." } ], "responses": { "200": { "description": "XML content", "content": { "application/json": { "schema": { "type": "string", "description": "XML content" } } } }, "404": { "description": "The requested template index does not exist", "content": { "application/json": { "schema": { "type": "object", "description": "The requested template index does not exist", "properties": { "error": { "type": "string" } } } } } } } }, "put": { "tags": [ "Response Formats" ], "description": "Returns XML content. A random template is selected unless a 1-based template index is provided (e.g. /xml/1) for stable output.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "index", "required": true, "description": "Optional 1-based template index for stable, repeatable output. Omit for a random template." } ], "responses": { "200": { "description": "XML content", "content": { "application/json": { "schema": { "type": "string", "description": "XML content" } } } }, "404": { "description": "The requested template index does not exist", "content": { "application/json": { "schema": { "type": "object", "description": "The requested template index does not exist", "properties": { "error": { "type": "string" } } } } } } } }, "patch": { "tags": [ "Response Formats" ], "description": "Returns XML content. A random template is selected unless a 1-based template index is provided (e.g. /xml/1) for stable output.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "index", "required": true, "description": "Optional 1-based template index for stable, repeatable output. Omit for a random template." } ], "responses": { "200": { "description": "XML content", "content": { "application/json": { "schema": { "type": "string", "description": "XML content" } } } }, "404": { "description": "The requested template index does not exist", "content": { "application/json": { "schema": { "type": "object", "description": "The requested template index does not exist", "properties": { "error": { "type": "string" } } } } } } } }, "delete": { "tags": [ "Response Formats" ], "description": "Returns XML content. A random template is selected unless a 1-based template index is provided (e.g. /xml/1) for stable output.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "index", "required": true, "description": "Optional 1-based template index for stable, repeatable output. Omit for a random template." } ], "responses": { "200": { "description": "XML content", "content": { "application/json": { "schema": { "type": "string", "description": "XML content" } } } }, "404": { "description": "The requested template index does not exist", "content": { "application/json": { "schema": { "type": "object", "description": "The requested template index does not exist", "properties": { "error": { "type": "string" } } } } } } } } }, "/json/{index}?": { "get": { "tags": [ "Response Formats" ], "description": "Returns JSON content. A random template is selected unless a 1-based template index is provided (e.g. /json/1) for stable output.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "index", "required": true, "description": "Optional 1-based template index for stable, repeatable output. Omit for a random template." } ], "responses": { "200": { "description": "JSON content", "content": { "application/json": { "schema": { "type": "object", "description": "JSON content", "additionalProperties": true } } } }, "404": { "description": "The requested template index does not exist", "content": { "application/json": { "schema": { "type": "object", "description": "The requested template index does not exist", "properties": { "error": { "type": "string" } } } } } } } }, "post": { "tags": [ "Response Formats" ], "description": "Returns JSON content. A random template is selected unless a 1-based template index is provided (e.g. /json/1) for stable output.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "index", "required": true, "description": "Optional 1-based template index for stable, repeatable output. Omit for a random template." } ], "responses": { "200": { "description": "JSON content", "content": { "application/json": { "schema": { "type": "object", "description": "JSON content", "additionalProperties": true } } } }, "404": { "description": "The requested template index does not exist", "content": { "application/json": { "schema": { "type": "object", "description": "The requested template index does not exist", "properties": { "error": { "type": "string" } } } } } } } }, "put": { "tags": [ "Response Formats" ], "description": "Returns JSON content. A random template is selected unless a 1-based template index is provided (e.g. /json/1) for stable output.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "index", "required": true, "description": "Optional 1-based template index for stable, repeatable output. Omit for a random template." } ], "responses": { "200": { "description": "JSON content", "content": { "application/json": { "schema": { "type": "object", "description": "JSON content", "additionalProperties": true } } } }, "404": { "description": "The requested template index does not exist", "content": { "application/json": { "schema": { "type": "object", "description": "The requested template index does not exist", "properties": { "error": { "type": "string" } } } } } } } }, "patch": { "tags": [ "Response Formats" ], "description": "Returns JSON content. A random template is selected unless a 1-based template index is provided (e.g. /json/1) for stable output.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "index", "required": true, "description": "Optional 1-based template index for stable, repeatable output. Omit for a random template." } ], "responses": { "200": { "description": "JSON content", "content": { "application/json": { "schema": { "type": "object", "description": "JSON content", "additionalProperties": true } } } }, "404": { "description": "The requested template index does not exist", "content": { "application/json": { "schema": { "type": "object", "description": "The requested template index does not exist", "properties": { "error": { "type": "string" } } } } } } } }, "delete": { "tags": [ "Response Formats" ], "description": "Returns JSON content. A random template is selected unless a 1-based template index is provided (e.g. /json/1) for stable output.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "index", "required": true, "description": "Optional 1-based template index for stable, repeatable output. Omit for a random template." } ], "responses": { "200": { "description": "JSON content", "content": { "application/json": { "schema": { "type": "object", "description": "JSON content", "additionalProperties": true } } } }, "404": { "description": "The requested template index does not exist", "content": { "application/json": { "schema": { "type": "object", "description": "The requested template index does not exist", "properties": { "error": { "type": "string" } } } } } } } } }, "/deny": { "get": { "tags": [ "Response Formats" ], "description": "Returns page denied by robots.txt rules", "responses": { "403": { "description": "Page denied by robots.txt rules", "content": { "application/json": { "schema": { "type": "string", "description": "Page denied by robots.txt rules" } } } } } }, "post": { "tags": [ "Response Formats" ], "description": "Returns page denied by robots.txt rules", "responses": { "403": { "description": "Page denied by robots.txt rules", "content": { "application/json": { "schema": { "type": "string", "description": "Page denied by robots.txt rules" } } } } } }, "put": { "tags": [ "Response Formats" ], "description": "Returns page denied by robots.txt rules", "responses": { "403": { "description": "Page denied by robots.txt rules", "content": { "application/json": { "schema": { "type": "string", "description": "Page denied by robots.txt rules" } } } } } }, "patch": { "tags": [ "Response Formats" ], "description": "Returns page denied by robots.txt rules", "responses": { "403": { "description": "Page denied by robots.txt rules", "content": { "application/json": { "schema": { "type": "string", "description": "Page denied by robots.txt rules" } } } } } }, "delete": { "tags": [ "Response Formats" ], "description": "Returns page denied by robots.txt rules", "responses": { "403": { "description": "Page denied by robots.txt rules", "content": { "application/json": { "schema": { "type": "string", "description": "Page denied by robots.txt rules" } } } } } } }, "/gzip": { "get": { "tags": [ "Response Formats" ], "description": "Returns GZip-encoded data", "responses": { "200": { "description": "GZip-encoded content", "content": { "application/json": { "schema": { "type": "string", "description": "GZip-encoded content" } } } } } }, "post": { "tags": [ "Response Formats" ], "description": "Returns GZip-encoded data", "responses": { "200": { "description": "GZip-encoded content", "content": { "application/json": { "schema": { "type": "string", "description": "GZip-encoded content" } } } } } }, "put": { "tags": [ "Response Formats" ], "description": "Returns GZip-encoded data", "responses": { "200": { "description": "GZip-encoded content", "content": { "application/json": { "schema": { "type": "string", "description": "GZip-encoded content" } } } } } }, "patch": { "tags": [ "Response Formats" ], "description": "Returns GZip-encoded data", "responses": { "200": { "description": "GZip-encoded content", "content": { "application/json": { "schema": { "type": "string", "description": "GZip-encoded content" } } } } } }, "delete": { "tags": [ "Response Formats" ], "description": "Returns GZip-encoded data", "responses": { "200": { "description": "GZip-encoded content", "content": { "application/json": { "schema": { "type": "string", "description": "GZip-encoded content" } } } } } } }, "/deflate": { "get": { "tags": [ "Response Formats" ], "description": "Returns Deflate-encoded data", "responses": { "200": { "description": "Deflate-encoded content", "content": { "application/json": { "schema": { "type": "string", "description": "Deflate-encoded content" } } } } } }, "post": { "tags": [ "Response Formats" ], "description": "Returns Deflate-encoded data", "responses": { "200": { "description": "Deflate-encoded content", "content": { "application/json": { "schema": { "type": "string", "description": "Deflate-encoded content" } } } } } }, "put": { "tags": [ "Response Formats" ], "description": "Returns Deflate-encoded data", "responses": { "200": { "description": "Deflate-encoded content", "content": { "application/json": { "schema": { "type": "string", "description": "Deflate-encoded content" } } } } } }, "patch": { "tags": [ "Response Formats" ], "description": "Returns Deflate-encoded data", "responses": { "200": { "description": "Deflate-encoded content", "content": { "application/json": { "schema": { "type": "string", "description": "Deflate-encoded content" } } } } } }, "delete": { "tags": [ "Response Formats" ], "description": "Returns Deflate-encoded data", "responses": { "200": { "description": "Deflate-encoded content", "content": { "application/json": { "schema": { "type": "string", "description": "Deflate-encoded content" } } } } } } }, "/brotli": { "get": { "tags": [ "Response Formats" ], "description": "Returns Brotli-encoded data", "responses": { "200": { "description": "Brotli-encoded content", "content": { "application/json": { "schema": { "type": "string", "description": "Brotli-encoded content" } } } } } }, "post": { "tags": [ "Response Formats" ], "description": "Returns Brotli-encoded data", "responses": { "200": { "description": "Brotli-encoded content", "content": { "application/json": { "schema": { "type": "string", "description": "Brotli-encoded content" } } } } } }, "put": { "tags": [ "Response Formats" ], "description": "Returns Brotli-encoded data", "responses": { "200": { "description": "Brotli-encoded content", "content": { "application/json": { "schema": { "type": "string", "description": "Brotli-encoded content" } } } } } }, "patch": { "tags": [ "Response Formats" ], "description": "Returns Brotli-encoded data", "responses": { "200": { "description": "Brotli-encoded content", "content": { "application/json": { "schema": { "type": "string", "description": "Brotli-encoded content" } } } } } }, "delete": { "tags": [ "Response Formats" ], "description": "Returns Brotli-encoded data", "responses": { "200": { "description": "Brotli-encoded content", "content": { "application/json": { "schema": { "type": "string", "description": "Brotli-encoded content" } } } } } } }, "/absolute-redirect/{value}": { "get": { "tags": [ "Redirects" ], "description": "Redirects the request to the target URL using an absolute URL", "parameters": [ { "schema": { "type": "integer", "minimum": 1 }, "in": "path", "name": "value", "required": true }, { "schema": { "type": "string" }, "in": "header", "name": "host", "required": true } ], "responses": { "302": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "string" } } } } } } }, "/relative-redirect/{value}": { "get": { "tags": [ "Redirects" ], "description": "Redirects the request to the target URL using an relative URL", "parameters": [ { "schema": { "type": "integer", "minimum": 1 }, "in": "path", "name": "value", "required": true }, { "schema": { "type": "string" }, "in": "header", "name": "host", "required": true } ], "responses": { "302": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "string" } } } } } } }, "/redirect-to": { "get": { "tags": [ "Redirects" ], "description": "Redirects the request to the target URL", "parameters": [ { "schema": { "type": "string", "format": "uri" }, "in": "query", "name": "url", "required": true, "description": "The URL to redirect to" }, { "schema": { "type": "string", "pattern": "^[1-5][0-9][0-9]$" }, "in": "query", "name": "status_code", "required": false, "description": "The HTTP status code to use for redirection" } ], "responses": { "200": { "description": "Default Response" } } }, "post": { "tags": [ "Redirects" ], "description": "Redirects the request to the target URL", "parameters": [ { "schema": { "type": "string", "format": "uri" }, "in": "query", "name": "url", "required": true, "description": "The URL to redirect to" }, { "schema": { "type": "string", "pattern": "^[1-5][0-9][0-9]$" }, "in": "query", "name": "status_code", "required": false, "description": "The HTTP status code to use for redirection" } ], "responses": { "200": { "description": "Default Response" } } }, "put": { "tags": [ "Redirects" ], "description": "Redirects the request to the target URL", "parameters": [ { "schema": { "type": "string", "format": "uri" }, "in": "query", "name": "url", "required": true, "description": "The URL to redirect to" }, { "schema": { "type": "string", "pattern": "^[1-5][0-9][0-9]$" }, "in": "query", "name": "status_code", "required": false, "description": "The HTTP status code to use for redirection" } ], "responses": { "200": { "description": "Default Response" } } }, "patch": { "tags": [ "Redirects" ], "description": "Redirects the request to the target URL", "parameters": [ { "schema": { "type": "string", "format": "uri" }, "in": "query", "name": "url", "required": true, "description": "The URL to redirect to" }, { "schema": { "type": "string", "pattern": "^[1-5][0-9][0-9]$" }, "in": "query", "name": "status_code", "required": false, "description": "The HTTP status code to use for redirection" } ], "responses": { "200": { "description": "Default Response" } } }, "delete": { "tags": [ "Redirects" ], "description": "Redirects the request to the target URL", "parameters": [ { "schema": { "type": "string", "format": "uri" }, "in": "query", "name": "url", "required": true, "description": "The URL to redirect to" }, { "schema": { "type": "string", "pattern": "^[1-5][0-9][0-9]$" }, "in": "query", "name": "status_code", "required": false, "description": "The HTTP status code to use for redirection" } ], "responses": { "200": { "description": "Default Response" } } } }, "/cookies": { "get": { "tags": [ "Cookies" ], "description": "Return cookies from the request", "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "cookies": { "type": "object", "additionalProperties": { "type": "string" } } }, "required": [ "cookies" ] } } } } } }, "post": { "tags": [ "Cookies" ], "description": "Set a cookie", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "value": { "type": "string" }, "expires": { "type": "string", "format": "date-time" } }, "required": [ "name", "value" ], "additionalProperties": false } } } }, "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "cookies": { "type": "object", "additionalProperties": { "type": "string" } } }, "required": [ "cookies" ] } } } } } }, "delete": { "tags": [ "Cookies" ], "description": "Delete a cookie", "parameters": [ { "schema": { "type": "string" }, "in": "query", "name": "name", "required": true } ], "responses": { "204": { "description": "Default Response" } } } }, "/anything": { "get": { "tags": [ "Anything" ], "description": "Will return anything that you send it", "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "args": { "type": "object", "description": "Route parameters", "additionalProperties": true }, "data": { "type": "object", "description": "Request body data", "additionalProperties": true }, "files": { "type": "object", "description": "Uploaded files", "additionalProperties": true }, "form": { "type": "object", "description": "Form data", "additionalProperties": true }, "headers": { "type": "object", "description": "Request headers", "additionalProperties": true }, "json": { "type": "object", "description": "Parsed JSON body", "additionalProperties": true }, "method": { "type": "string", "description": "HTTP method used" }, "origin": { "type": "string", "description": "Origin of the request" }, "url": { "type": "string", "description": "Request URL" } }, "additionalProperties": false } } } } } }, "post": { "tags": [ "Anything" ], "description": "Will return anything that you send it", "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "args": { "type": "object", "description": "Route parameters", "additionalProperties": true }, "data": { "type": "object", "description": "Request body data", "additionalProperties": true }, "files": { "type": "object", "description": "Uploaded files", "additionalProperties": true }, "form": { "type": "object", "description": "Form data", "additionalProperties": true }, "headers": { "type": "object", "description": "Request headers", "additionalProperties": true }, "json": { "type": "object", "description": "Parsed JSON body", "additionalProperties": true }, "method": { "type": "string", "description": "HTTP method used" }, "origin": { "type": "string", "description": "Origin of the request" }, "url": { "type": "string", "description": "Request URL" } }, "additionalProperties": false } } } } } }, "put": { "tags": [ "Anything" ], "description": "Will return anything that you send it", "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "args": { "type": "object", "description": "Route parameters", "additionalProperties": true }, "data": { "type": "object", "description": "Request body data", "additionalProperties": true }, "files": { "type": "object", "description": "Uploaded files", "additionalProperties": true }, "form": { "type": "object", "description": "Form data", "additionalProperties": true }, "headers": { "type": "object", "description": "Request headers", "additionalProperties": true }, "json": { "type": "object", "description": "Parsed JSON body", "additionalProperties": true }, "method": { "type": "string", "description": "HTTP method used" }, "origin": { "type": "string", "description": "Origin of the request" }, "url": { "type": "string", "description": "Request URL" } }, "additionalProperties": false } } } } } }, "patch": { "tags": [ "Anything" ], "description": "Will return anything that you send it", "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "args": { "type": "object", "description": "Route parameters", "additionalProperties": true }, "data": { "type": "object", "description": "Request body data", "additionalProperties": true }, "files": { "type": "object", "description": "Uploaded files", "additionalProperties": true }, "form": { "type": "object", "description": "Form data", "additionalProperties": true }, "headers": { "type": "object", "description": "Request headers", "additionalProperties": true }, "json": { "type": "object", "description": "Parsed JSON body", "additionalProperties": true }, "method": { "type": "string", "description": "HTTP method used" }, "origin": { "type": "string", "description": "Origin of the request" }, "url": { "type": "string", "description": "Request URL" } }, "additionalProperties": false } } } } } }, "delete": { "tags": [ "Anything" ], "description": "Will return anything that you send it", "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "args": { "type": "object", "description": "Route parameters", "additionalProperties": true }, "data": { "type": "object", "description": "Request body data", "additionalProperties": true }, "files": { "type": "object", "description": "Uploaded files", "additionalProperties": true }, "form": { "type": "object", "description": "Form data", "additionalProperties": true }, "headers": { "type": "object", "description": "Request headers", "additionalProperties": true }, "json": { "type": "object", "description": "Parsed JSON body", "additionalProperties": true }, "method": { "type": "string", "description": "HTTP method used" }, "origin": { "type": "string", "description": "Origin of the request" }, "url": { "type": "string", "description": "Request URL" } }, "additionalProperties": false } } } } } } }, "/basic-auth/{user}/{passwd}": { "get": { "tags": [ "Auth" ], "description": "HTTP Basic authentication. Succeeds only if the user/pass provided in the path matches the Basic Authorization header.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "user", "required": true }, { "schema": { "type": "string" }, "in": "path", "name": "passwd", "required": true } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "authenticated": { "type": "boolean" }, "user": { "type": "string" } }, "required": [ "authenticated", "user" ] } } } }, "401": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } } } } } }, "/bearer": { "get": { "tags": [ "Auth" ], "description": "HTTP Bearer authentication. Succeeds if any Bearer token is present unless ?required=true is provided.", "parameters": [ { "schema": { "type": "boolean", "default": true }, "in": "query", "name": "required", "required": false } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "authenticated": { "type": "boolean" }, "token": { "type": "string" } }, "required": [ "authenticated", "token" ] } } } }, "401": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } } } } } }, "/digest-auth/{qop}/{user}/{passwd}": { "get": { "tags": [ "Auth" ], "description": "HTTP Digest authentication. Mirrors httpbin behavior for testing clients.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "qop", "required": true }, { "schema": { "type": "string" }, "in": "path", "name": "user", "required": true }, { "schema": { "type": "string" }, "in": "path", "name": "passwd", "required": true }, { "schema": { "type": "string" }, "in": "path", "name": "algorithm", "required": true }, { "schema": { "type": "string" }, "in": "path", "name": "stale_after", "required": true } ], "responses": { "200": { "description": "Default Response" } } } }, "/digest-auth/{qop}/{user}/{passwd}/{algorithm}": { "get": { "tags": [ "Auth" ], "description": "HTTP Digest authentication. Mirrors httpbin behavior for testing clients.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "qop", "required": true }, { "schema": { "type": "string" }, "in": "path", "name": "user", "required": true }, { "schema": { "type": "string" }, "in": "path", "name": "passwd", "required": true }, { "schema": { "type": "string" }, "in": "path", "name": "algorithm", "required": true }, { "schema": { "type": "string" }, "in": "path", "name": "stale_after", "required": true } ], "responses": { "200": { "description": "Default Response" } } } }, "/image": { "get": { "tags": [ "Images" ], "description": "Returns an image based on Accept header (supports jpeg, png, svg, webp)", "parameters": [ { "schema": { "type": "string" }, "in": "header", "name": "accept", "required": false, "description": "Accept header for content negotiation" } ], "responses": { "200": { "description": "Image file", "content": { "application/json": { "schema": { "description": "Image file", "type": "string", "format": "binary" } } } } } } }, "/image/jpeg": { "get": { "tags": [ "Images" ], "description": "Returns a JPEG image", "responses": { "200": { "description": "JPEG image", "content": { "application/json": { "schema": { "description": "JPEG image", "type": "string", "format": "binary" } } } } } } }, "/image/png": { "get": { "tags": [ "Images" ], "description": "Returns a PNG image", "responses": { "200": { "description": "PNG image", "content": { "application/json": { "schema": { "description": "PNG image", "type": "string", "format": "binary" } } } } } } }, "/image/svg": { "get": { "tags": [ "Images" ], "description": "Returns an SVG image", "responses": { "200": { "description": "SVG image", "content": { "application/json": { "schema": { "description": "SVG image", "type": "string", "format": "binary" } } } } } } }, "/image/webp": { "get": { "tags": [ "Images" ], "description": "Returns a WEBP image", "responses": { "200": { "description": "WEBP image", "content": { "application/json": { "schema": { "description": "WEBP image", "type": "string", "format": "binary" } } } } } } }, "/uuid": { "get": { "tags": [ "Dynamic Data" ], "description": "Return a UUID4", "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "uuid": { "type": "string", "format": "uuid" } }, "required": [ "uuid" ] } } } } } } }, "/bytes/{n}": { "get": { "tags": [ "Dynamic Data" ], "description": "Returns n random bytes generated with given seed", "parameters": [ { "schema": { "type": "string" }, "in": "query", "name": "seed", "required": false, "description": "Seed for random number generation" }, { "schema": { "type": "string" }, "in": "path", "name": "n", "required": true, "description": "Number of bytes to generate" } ], "responses": { "200": { "description": "Random binary data", "content": { "application/json": { "schema": { "type": "string", "description": "Random binary data" } } } }, "400": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } } } } } } } } }, "/stream-bytes/{n}": { "get": { "tags": [ "Dynamic Data" ], "description": "Streams n random bytes generated with given seed, in chunks of chunk_size per packet", "parameters": [ { "schema": { "type": "string" }, "in": "query", "name": "seed", "required": false, "description": "Seed for random number generation" }, { "schema": { "type": "string" }, "in": "query", "name": "chunk_size", "required": false, "description": "Size of each chunk (default: 10240)" }, { "schema": { "type": "string" }, "in": "path", "name": "n", "required": true, "description": "Number of bytes to stream" } ], "responses": { "200": { "description": "Streamed random binary data", "content": { "application/json": { "schema": { "type": "string", "description": "Streamed random binary data" } } } }, "400": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } } } } } } } } }, "/delay/{delay}": { "get": { "tags": [ "Dynamic Data" ], "description": "Returns a delayed response (max of 10 seconds)", "parameters": [ { "schema": "object", "in": "query", "name": "type" }, { "schema": true, "in": "query", "name": "additionalProperties" }, { "schema": { "type": "string" }, "in": "path", "name": "delay", "required": true, "description": "Delay in seconds (max 10)" } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "args": { "type": "object" }, "data": { "type": "string" }, "files": { "type": "object" }, "form": { "type": "object" }, "headers": { "type": "object" }, "origin": { "type": "string" }, "url": { "type": "string" } } } } } }, "400": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } } } } } } } }, "post": { "tags": [ "Dynamic Data" ], "description": "Returns a delayed response (max of 10 seconds)", "parameters": [ { "schema": "object", "in": "query", "name": "type" }, { "schema": true, "in": "query", "name": "additionalProperties" }, { "schema": { "type": "string" }, "in": "path", "name": "delay", "required": true, "description": "Delay in seconds (max 10)" } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "args": { "type": "object" }, "data": { "type": "string" }, "files": { "type": "object" }, "form": { "type": "object" }, "headers": { "type": "object" }, "origin": { "type": "string" }, "url": { "type": "string" } } } } } }, "400": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } } } } } } } }, "put": { "tags": [ "Dynamic Data" ], "description": "Returns a delayed response (max of 10 seconds)", "parameters": [ { "schema": "object", "in": "query", "name": "type" }, { "schema": true, "in": "query", "name": "additionalProperties" }, { "schema": { "type": "string" }, "in": "path", "name": "delay", "required": true, "description": "Delay in seconds (max 10)" } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "args": { "type": "object" }, "data": { "type": "string" }, "files": { "type": "object" }, "form": { "type": "object" }, "headers": { "type": "object" }, "origin": { "type": "string" }, "url": { "type": "string" } } } } } }, "400": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } } } } } } } }, "patch": { "tags": [ "Dynamic Data" ], "description": "Returns a delayed response (max of 10 seconds)", "parameters": [ { "schema": "object", "in": "query", "name": "type" }, { "schema": true, "in": "query", "name": "additionalProperties" }, { "schema": { "type": "string" }, "in": "path", "name": "delay", "required": true, "description": "Delay in seconds (max 10)" } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "args": { "type": "object" }, "data": { "type": "string" }, "files": { "type": "object" }, "form": { "type": "object" }, "headers": { "type": "object" }, "origin": { "type": "string" }, "url": { "type": "string" } } } } } }, "400": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } } } } } } } }, "delete": { "tags": [ "Dynamic Data" ], "description": "Returns a delayed response (max of 10 seconds)", "parameters": [ { "schema": "object", "in": "query", "name": "type" }, { "schema": true, "in": "query", "name": "additionalProperties" }, { "schema": { "type": "string" }, "in": "path", "name": "delay", "required": true, "description": "Delay in seconds (max 10)" } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "args": { "type": "object" }, "data": { "type": "string" }, "files": { "type": "object" }, "form": { "type": "object" }, "headers": { "type": "object" }, "origin": { "type": "string" }, "url": { "type": "string" } } } } } }, "400": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } } } } } } } } }, "/base64/{value}": { "get": { "tags": [ "Dynamic Data" ], "description": "Decodes base64url-encoded string", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "value", "required": true, "description": "Base64 encoded value to decode" } ], "responses": { "200": { "description": "Decoded value", "content": { "application/json": { "schema": { "type": "string", "description": "Decoded value" } } } }, "400": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } } } } } } } } }, "/stream/{n}": { "get": { "tags": [ "Dynamic Data" ], "description": "Stream n JSON responses", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "n", "required": true, "description": "Number of JSON responses to stream (max 100)" } ], "responses": { "200": { "description": "Newline-delimited JSON responses", "content": { "application/json": { "schema": { "type": "string", "description": "Newline-delimited JSON responses" } } } }, "400": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } } } } } } } } }, "/range/{numbytes}": { "get": { "tags": [ "Dynamic Data" ], "description": "Streams n random bytes generated, and supports HTTP Range requests", "parameters": [ { "schema": { "type": "string" }, "in": "query", "name": "duration", "required": false, "description": "Delay before sending response in seconds" }, { "schema": { "type": "string" }, "in": "path", "name": "numbytes", "required": true, "description": "Number of bytes available" } ], "responses": { "200": { "description": "Binary data", "content": { "application/json": { "schema": { "type": "string", "description": "Binary data" } } } }, "206": { "description": "Partial binary data", "content": { "application/json": { "schema": { "type": "string", "description": "Partial binary data" } } } }, "400": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } } } } } }, "416": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } } } } } } } } }, "/drip": { "get": { "tags": [ "Dynamic Data" ], "description": "Drips data over a duration after an optional initial delay, then (optionally) returns with the given status code", "parameters": [ { "schema": { "type": "string" }, "in": "query", "name": "duration", "required": false, "description": "Duration in seconds over which to drip the data (default: 2)" }, { "schema": { "type": "string" }, "in": "query", "name": "numbytes", "required": false, "description": "Number of bytes to send (default: 10)" }, { "schema": { "type": "string" }, "in": "query", "name": "code", "required": false, "description": "HTTP status code to return (default: 200)" }, { "schema": { "type": "string" }, "in": "query", "name": "delay", "required": false, "description": "Initial delay in seconds before starting (default: 2)" } ], "responses": { "200": { "description": "Dripped data", "content": { "application/json": { "schema": { "type": "string", "description": "Dripped data" } } } }, "400": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } } } } } } } } }, "/links/{n}/{offset}?": { "get": { "tags": [ "Dynamic Data" ], "description": "Generate a page containing n links to other pages which do the same", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "n", "required": true, "description": "Number of links to generate" }, { "schema": { "type": "string" }, "in": "path", "name": "offset", "required": true, "description": "Starting offset for pagination (default: 0)" } ], "responses": { "200": { "description": "HTML page with links", "content": { "application/json": { "schema": { "type": "string", "description": "HTML page with links" } } } }, "400": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } } } } } } } } }, "/bins": { "post": { "tags": [ "Bins" ], "description": "Create a new request bin", "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "url": { "type": "string" }, "createdAt": { "type": "string" }, "expiresAt": { "type": "string" }, "requestCount": { "type": "integer" } }, "required": [ "id", "url", "createdAt", "expiresAt", "requestCount" ] } } } } } }, "get": { "tags": [ "Bins" ], "description": "List all active bins", "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "bins": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "createdAt": { "type": "string" }, "expiresAt": { "type": "string" }, "requestCount": { "type": "integer" } }, "required": [ "id", "createdAt", "expiresAt", "requestCount" ] } } }, "required": [ "bins" ] } } } } } } }, "/bins/{id}": { "get": { "tags": [ "Bins" ], "description": "Get metadata for a single bin", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "id", "required": true } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "createdAt": { "type": "string" }, "expiresAt": { "type": "string" }, "requestCount": { "type": "integer" } }, "required": [ "id", "createdAt", "expiresAt", "requestCount" ] } } } }, "404": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": [ "error" ] } } } } } }, "delete": { "tags": [ "Bins" ], "description": "Delete a bin and all its captured requests", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "id", "required": true } ], "responses": { "204": { "description": "Default Response" }, "404": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": [ "error" ] } } } } } } }, "/bins/{id}/requests": { "get": { "tags": [ "Bins" ], "description": "List captured requests for a bin (newest first)", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "id", "required": true } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "requests": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "binId": { "type": "string" }, "method": { "type": "string" }, "url": { "type": "string" }, "path": { "type": "string" }, "query": { "type": "object", "additionalProperties": true }, "headers": { "type": "object", "additionalProperties": true }, "remoteAddress": { "type": "string" }, "contentType": { "type": "string" }, "bodySize": { "type": "integer" }, "body": { "type": "string", "nullable": true }, "bodyEncoding": { "type": "string", "enum": [ "utf8", "base64", "none" ] }, "truncated": { "type": "boolean" }, "capturedAt": { "type": "string" } }, "required": [ "id", "binId", "method", "url", "path", "query", "headers", "remoteAddress", "bodySize", "body", "bodyEncoding", "truncated", "capturedAt" ] } } }, "required": [ "requests" ] } } } }, "404": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": [ "error" ] } } } } } }, "delete": { "tags": [ "Bins" ], "description": "Clear all captured requests for a bin", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "id", "required": true } ], "responses": { "204": { "description": "Default Response" }, "404": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": [ "error" ] } } } } } } }, "/bins/{id}/requests/{reqId}": { "get": { "tags": [ "Bins" ], "description": "Get a single captured request by id", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "id", "required": true }, { "schema": { "type": "string" }, "in": "path", "name": "reqId", "required": true } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "binId": { "type": "string" }, "method": { "type": "string" }, "url": { "type": "string" }, "path": { "type": "string" }, "query": { "type": "object", "additionalProperties": true }, "headers": { "type": "object", "additionalProperties": true }, "remoteAddress": { "type": "string" }, "contentType": { "type": "string" }, "bodySize": { "type": "integer" }, "body": { "type": "string", "nullable": true }, "bodyEncoding": { "type": "string", "enum": [ "utf8", "base64", "none" ] }, "truncated": { "type": "boolean" }, "capturedAt": { "type": "string" } }, "required": [ "id", "binId", "method", "url", "path", "query", "headers", "remoteAddress", "bodySize", "body", "bodyEncoding", "truncated", "capturedAt" ] } } } }, "404": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": [ "error" ] } } } } } } }, "/b/{id}": { "get": { "tags": [ "Bins" ], "description": "Capture any HTTP request sent to a bin. Stores method, headers, body, query, and metadata.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "id", "required": true, "description": "Bin identifier" }, { "schema": { "type": "string" }, "in": "path", "name": "*", "required": true, "description": "Sub-path captured with the request" } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "ok": { "type": "boolean" }, "binId": { "type": "string" }, "requestId": { "type": "string" } }, "required": [ "ok", "binId", "requestId" ] } } } }, "404": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": [ "error" ] } } } } } }, "post": { "tags": [ "Bins" ], "description": "Capture any HTTP request sent to a bin. Stores method, headers, body, query, and metadata.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "id", "required": true, "description": "Bin identifier" }, { "schema": { "type": "string" }, "in": "path", "name": "*", "required": true, "description": "Sub-path captured with the request" } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "ok": { "type": "boolean" }, "binId": { "type": "string" }, "requestId": { "type": "string" } }, "required": [ "ok", "binId", "requestId" ] } } } }, "404": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": [ "error" ] } } } } } }, "put": { "tags": [ "Bins" ], "description": "Capture any HTTP request sent to a bin. Stores method, headers, body, query, and metadata.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "id", "required": true, "description": "Bin identifier" }, { "schema": { "type": "string" }, "in": "path", "name": "*", "required": true, "description": "Sub-path captured with the request" } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "ok": { "type": "boolean" }, "binId": { "type": "string" }, "requestId": { "type": "string" } }, "required": [ "ok", "binId", "requestId" ] } } } }, "404": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": [ "error" ] } } } } } }, "patch": { "tags": [ "Bins" ], "description": "Capture any HTTP request sent to a bin. Stores method, headers, body, query, and metadata.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "id", "required": true, "description": "Bin identifier" }, { "schema": { "type": "string" }, "in": "path", "name": "*", "required": true, "description": "Sub-path captured with the request" } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "ok": { "type": "boolean" }, "binId": { "type": "string" }, "requestId": { "type": "string" } }, "required": [ "ok", "binId", "requestId" ] } } } }, "404": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": [ "error" ] } } } } } }, "delete": { "tags": [ "Bins" ], "description": "Capture any HTTP request sent to a bin. Stores method, headers, body, query, and metadata.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "id", "required": true, "description": "Bin identifier" }, { "schema": { "type": "string" }, "in": "path", "name": "*", "required": true, "description": "Sub-path captured with the request" } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "ok": { "type": "boolean" }, "binId": { "type": "string" }, "requestId": { "type": "string" } }, "required": [ "ok", "binId", "requestId" ] } } } }, "404": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": [ "error" ] } } } } } }, "options": { "tags": [ "Bins" ], "description": "Capture any HTTP request sent to a bin. Stores method, headers, body, query, and metadata.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "id", "required": true, "description": "Bin identifier" }, { "schema": { "type": "string" }, "in": "path", "name": "*", "required": true, "description": "Sub-path captured with the request" } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "ok": { "type": "boolean" }, "binId": { "type": "string" }, "requestId": { "type": "string" } }, "required": [ "ok", "binId", "requestId" ] } } } }, "404": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": [ "error" ] } } } } } } }, "/b/{id}/{*}": { "get": { "tags": [ "Bins" ], "description": "Capture any HTTP request sent to a bin. Stores method, headers, body, query, and metadata.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "id", "required": true, "description": "Bin identifier" }, { "schema": { "type": "string" }, "in": "path", "name": "*", "required": true, "description": "Sub-path captured with the request" } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "ok": { "type": "boolean" }, "binId": { "type": "string" }, "requestId": { "type": "string" } }, "required": [ "ok", "binId", "requestId" ] } } } }, "404": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": [ "error" ] } } } } } }, "post": { "tags": [ "Bins" ], "description": "Capture any HTTP request sent to a bin. Stores method, headers, body, query, and metadata.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "id", "required": true, "description": "Bin identifier" }, { "schema": { "type": "string" }, "in": "path", "name": "*", "required": true, "description": "Sub-path captured with the request" } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "ok": { "type": "boolean" }, "binId": { "type": "string" }, "requestId": { "type": "string" } }, "required": [ "ok", "binId", "requestId" ] } } } }, "404": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": [ "error" ] } } } } } }, "put": { "tags": [ "Bins" ], "description": "Capture any HTTP request sent to a bin. Stores method, headers, body, query, and metadata.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "id", "required": true, "description": "Bin identifier" }, { "schema": { "type": "string" }, "in": "path", "name": "*", "required": true, "description": "Sub-path captured with the request" } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "ok": { "type": "boolean" }, "binId": { "type": "string" }, "requestId": { "type": "string" } }, "required": [ "ok", "binId", "requestId" ] } } } }, "404": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": [ "error" ] } } } } } }, "patch": { "tags": [ "Bins" ], "description": "Capture any HTTP request sent to a bin. Stores method, headers, body, query, and metadata.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "id", "required": true, "description": "Bin identifier" }, { "schema": { "type": "string" }, "in": "path", "name": "*", "required": true, "description": "Sub-path captured with the request" } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "ok": { "type": "boolean" }, "binId": { "type": "string" }, "requestId": { "type": "string" } }, "required": [ "ok", "binId", "requestId" ] } } } }, "404": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": [ "error" ] } } } } } }, "delete": { "tags": [ "Bins" ], "description": "Capture any HTTP request sent to a bin. Stores method, headers, body, query, and metadata.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "id", "required": true, "description": "Bin identifier" }, { "schema": { "type": "string" }, "in": "path", "name": "*", "required": true, "description": "Sub-path captured with the request" } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "ok": { "type": "boolean" }, "binId": { "type": "string" }, "requestId": { "type": "string" } }, "required": [ "ok", "binId", "requestId" ] } } } }, "404": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": [ "error" ] } } } } } }, "options": { "tags": [ "Bins" ], "description": "Capture any HTTP request sent to a bin. Stores method, headers, body, query, and metadata.", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "id", "required": true, "description": "Bin identifier" }, { "schema": { "type": "string" }, "in": "path", "name": "*", "required": true, "description": "Sub-path captured with the request" } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "ok": { "type": "boolean" }, "binId": { "type": "string" }, "requestId": { "type": "string" } }, "required": [ "ok", "binId", "requestId" ] } } } }, "404": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": [ "error" ] } } } } } } } }, "servers": [ { "url": "", "description": "This instance" } ] } ## Changelog URL: https://mockhttp.org/changelog ### v3.0.2 URL: https://mockhttp.org/changelog/v3-0-2 Date: November 14, 2026 Tag: Release ## @jaredwray/mockhttp@3.0.2 — 2026-11-14 Patch security issues in mongodb, Node.js, set-cookie-parser, and minimatch, and fix the Wasmer install. ### Bug Fixes - mount pnpm-workspace.yaml during the Wasmer install (#263) - security - mongodb 7.8.0 (CVE-2026-119179) (#264) - pin Node.js 24.22.3 for the November security release (#266) - security - set-cookie-parser 2.7.3 (AIKIDO-2026-269475) (#267) - security - minimatch 11.0.5 (CVE-2026-118764) (#268) ### Internal - remove stale minimumReleaseAgeExclude entries (#265) ### Contributors - @jaredwray (5) - @cursoragent (1) ### Full List of Changes - fix: mount pnpm-workspace.yaml during the Wasmer install by @jaredwray in #263 - fix: security - mongodb 7.8.0 (CVE-2026-119179) by @jaredwray in #264 - chore: remove stale minimumReleaseAgeExclude entries by @jaredwray in #265 - fix: security - Node.js to 24.22.3 (Nov 2026 security release) by @jaredwray in #266 - fix: security - set-cookie-parser 2.7.3 (AIKIDO-2026-269475) by @jaredwray in #267 - fix: security - minimatch 11.0.5 (CVE-2026-118764) by @jaredwray in #268 **Full diff:** [https://github.com/jaredwray/mockhttp/compare/v3.0.1...v3.0.2](https://github.com/jaredwray/mockhttp/compare/v3.0.1...v3.0.2) ### v3.0.1 URL: https://mockhttp.org/changelog/v3-0-1 Date: October 28, 2026 Tag: Release ## @jaredwray/mockhttp@3.0.1 — 2026-10-28 Security patches and Worker fixes. /healthz omits scheme, host, username, and password length. ### Bug Fixes - start the Worker during isolate startup (#248) - report bin store health and keep a failed connect in process (#249) - drop every second socket error that has no listener (#250) - Add redacted URI diagnostics to /healthz (#254) - open one MongoDB client per Worker request to stop 1101s on bins (#255) - pin Node 24.22.1 and patched undici (#256) - force miniflare's sharp pin to 0.35.5 (#257) - bump zod to 4.6.7 for GHSA-mrhx-c7xc-m3w5 (#258) - security - markdown-it 15.0.3 (CVE-2026-111758) (#260) - omit scheme and URI identity from /healthz (#262) ```json { "status": "ok", "bins": { "connected": true, "uriPresent": true, "uri": { "atCount": 1, "passwordHasPercent": false } } } ``` ### Documentation - remove the empty vars note from the Cloudflare page (#253) ### Internal - point worker URI fixtures at example.invalid (#251) - declare empty Worker vars in Wrangler (#252) - list LICENSE in the published package files (#259) ### Contributors - @jaredwray (13) - @cursoragent (1) ### Full List of Changes - fix: restore Cloudflare Worker routes after the v3.0.0 startup crash by @jaredwray in #248 - Add GET /healthz and redact bin store errors by @jaredwray in #249 - Use example.invalid for worker test URI fixtures by @jaredwray in #251 - Drop every second socket error that has no listener by @jaredwray in #250 - Declare empty Worker vars in Wrangler by @jaredwray in #252 - Remove the empty vars note from the Cloudflare page by @jaredwray in #253 - Add redacted URI diagnostics to /healthz by @jaredwray in #254 - fix: open one MongoDB client per Worker request to stop 1101s on bins by @jaredwray in #255 - security: pin Node 24.22.1 and patched undici by @jaredwray in #256 - fix: security - upgrade sharp to 0.35.5 (libheif RCE) by @jaredwray in #257 - fix: security - bump zod to 4.6.7 (GHSA-mrhx-c7xc-m3w5) by @jaredwray in #258 - chore: list LICENSE in the published package files by @jaredwray in #259 - fix: security - markdown-it 15.0.3 (CVE-2026-111758) by @jaredwray in #260 - fix: omit scheme and URI identity from /healthz by @jaredwray in #262 **Full diff:** [https://github.com/jaredwray/mockhttp/compare/v3.0.0...v3.0.1](https://github.com/jaredwray/mockhttp/compare/v3.0.0...v3.0.1) ### v3.0.0 URL: https://mockhttp.org/changelog/v3-0-0 Date: October 20, 2026 Tag: Release ## @jaredwray/mockhttp@3.0.0 — 2026-10-19 Request bins now use Keyv via MockHttpBins, and the Worker can store them in MongoDB Atlas. ### ⚠ BREAKING CHANGES - Replace `BinManager`, `BinStore`, and `InMemoryBinStore` with async `MockHttpBins`. `mock.bins.start()` and `mock.bins.stop()` are removed. The default `maxBodySize` is 128 KiB (was 1 MiB). Node engines are now `>=22.19.0` (was `>=22.18.0`). (`b1ddcc0`, #246) Migration: assign `mock.bins = new MockHttpBins({ keyv })` before `start()` (default store is `new Keyv()`) and `await` the bin methods. ```ts import Keyv from "keyv"; import { MockHttp, MockHttpBins } from "@jaredwray/mockhttp"; const mock = new MockHttp(); mock.bins = new MockHttpBins({ keyv: new Keyv(), maxBodySize: 128 * 1024 }); await mock.start(); const bin = await mock.bins.createBin(); ``` ### Features - Store Worker request bins in MongoDB Atlas when `MONGODB_URI` is set (`266157b`, #247) ```bash # Cloudflare Worker secret. Bins go in the Atlas `bins` collection. # Leave MONGODB_URI unset to keep the in-memory Keyv. wrangler secret put MONGODB_URI ``` ### Bug Fixes - security - upgrade fastify proxy-addr, fast-uri, find-my-way, undici (`9c52869`, #233) - security - upgrade handlebars, source-map-js (`28aa662`, #236) ### Internal - sync defense-in-depth files from agentic (`7fb3ce4`, #234) - upgrade code quality dependencies (`a57b990`, #235) - upgrade TypeScript and build tooling (`b11fa0f`, #237) - upgrade monorepo tooling (`58e8596`, #238) - upgrade GitHub Actions (`58bc448`, #239) - upgrade Dev Container images (`2047c3c`, #240) - upgrade Fastify dependencies (`3e93bea`, #241) - upgrade hookified (`d938e6e`, #242) - upgrade pino and pino-pretty (`c2a94ad`, #243) - upgrade Docker Node.js runtime image (`cd5decf`, #244) - pin the Compose image (`74ad4ea`, #245) ### Contributors - @jaredwray (11) - @cursoragent (5) ### Full List of Changes - fix: security - upgrade fastify proxy-addr, fast-uri, find-my-way, undici by @jaredwray in #233 - mono - chore: sync defense-in-depth files from agentic by @jaredwray in #234 - mono - chore: upgrade code quality dependencies by @jaredwray in #235 - fix: security - upgrade handlebars, source-map-js by @jaredwray in #236 - mono - chore: upgrade TypeScript and build tooling by @jaredwray in #237 - mono - chore: upgrade monorepo tooling by @jaredwray in #238 - mono - chore: upgrade GitHub Actions by @jaredwray in #239 - mono - chore: upgrade Dev Container images by @jaredwray in #240 - mono - chore: upgrade Fastify dependencies by @jaredwray in #241 - mono - chore: upgrade hookified by @jaredwray in #242 - mono - chore: upgrade pino and pino-pretty by @jaredwray in #243 - mono - chore: upgrade Docker Node.js runtime image by @jaredwray in #244 - mono - chore: pin the Compose image by @jaredwray in #245 - Store request bins in Keyv by @jaredwray in #246 - Store Worker request bins in MongoDB Atlas by @jaredwray in #247 **Full diff:** [https://github.com/jaredwray/mockhttp/compare/v2.1.0...v3.0.0](https://github.com/jaredwray/mockhttp/compare/v2.1.0...v3.0.0) ### v2.1.0 URL: https://mockhttp.org/changelog/v2-1-0 Date: October 3, 2026 Tag: Release ## @jaredwray/mockhttp@2.1.0 — 2026-10-03 Add AUTO_DETECT_PORT=false so the process keeps PORT, and include the docs site in the npm package. ### Features - Deploy the Node server to Wasmer Edge (#225) ```bash PORT=3000 AUTO_DETECT_PORT=false node dist/index.mjs ``` ### Bug Fixes - include Docula site in the npm tarball (#222) - deploy Wasmer with a remote build (#226) - deploy Wasmer through the Anybuild file (#228) ### Documentation - add Drydock review badge to README (#224) - rename Hosted Service page to MockHttp.org Live (#230) - add How to Deploy guides for Cloudflare, Docker, and Wasmer (#229) ### Internal - root - defense - close catalog gaps from current skill (#221) - Publish the GitHub Actions build to Wasmer (#227) ### Contributors - @jaredwray (owner) ### Full List of Changes - root - chore: defense - close catalog gaps from current skill by @jaredwray in #221 - fix: include Docula site in the npm tarball by @jaredwray in #222 - docs: add Drydock review badge to README by @jaredwray in #224 - Deploy the Node server to Wasmer Edge by @jaredwray in #225 - Fix the Wasmer deploy by using a remote build by @jaredwray in #226 - Publish the GitHub Actions build to Wasmer by @jaredwray in #227 - Deploy Wasmer with the Anybuild file by @jaredwray in #228 - docs: rename Hosted Service to MockHttp.org Live by @jaredwray in #230 - docs: add How to Deploy guides for Cloudflare, Docker, and Wasmer by @jaredwray in #229 **Full diff:** [https://github.com/jaredwray/mockhttp/compare/v2.0.0...v2.1.0](https://github.com/jaredwray/mockhttp/compare/v2.0.0...v2.1.0) ### v2.0.0 URL: https://mockhttp.org/changelog/v2-0-0 Date: September 18, 2026 Tag: Release ## @jaredwray/mockhttp@2.0.0 — 2026-09-18 Replace Scalar with a Docula site, run mockhttp.org on a Worker, and add initialize(). ### Features - replace Scalar with a Docula documentation site (#209) ```http # Before 1.10.0 After 1.10.0 GET / → Scalar UI Docula Getting Started GET /docs → Swagger UI Docula docs GET /docs/json → OpenAPI JSON 404 GET /api/ → (none) Interactive OpenAPI GET /openapi.json → (none) Live OpenAPI spec GET /get → unchanged unchanged ``` - migrate production deploy from GCP Cloud Run to Cloudflare Containers (#207) - run mockhttp.org on a Cloudflare Worker only (#218) ```ts const mock = new MockHttp({ logging: false, autoDetectPort: false, staticFiles: false, pluginTimeout: 0, startBins: false, }); await mock.initialize(); // register routes without listen() const response = await mock.server.inject({ method: "GET", url: "/get" }); ``` - use the Docula docs index as the homepage (#219) ### Internal - lower Cloudflare Containers max instances to 3 (#208) - upgrade @biomejs/biome 2.5.8 → 2.5.13, vitest 4.1.10 → 5.0.0 (#210) - upgrade @swc/core 1.15.47 → 1.16.2, tsdown 0.22.14 → 0.23.0, tsx 4.23.12 → 4.23.13 (#211) - upgrade package manager pnpm 11.21.0 → 12.4.1 (#212) - upgrade GitHub Actions (codecov, CodeQL, zizmor, Socket Firewall) (#213) - pin Dev Container image to javascript-node 5.2.1-24-trixie (#214) - upgrade fastify 5.11.3 → 5.12.4, @fastify/helmet 13.1.0 → 13.1.1 (#215) - upgrade hookified 3.0.2 → 3.0.3 (#216) - pin Docker Node.js runtime image to node:24.20.0-alpine3.24 (#217) ### Contributors - @jaredwray (13) ### Full List of Changes - Migrate production deploy from GCP Cloud Run to Cloudflare Containers by @jaredwray in #207 - Lower Cloudflare Containers max instances to 3 by @jaredwray in #208 - Replace Scalar with a Docula documentation site by @jaredwray in #209 - root - chore: upgrade code quality dependencies by @jaredwray in #210 - root - chore: upgrade TypeScript and build tooling by @jaredwray in #211 - root - chore: upgrade package manager by @jaredwray in #212 - root - chore: upgrade GitHub Actions by @jaredwray in #213 - root - chore: pin Dev Container images by @jaredwray in #214 - root - chore: upgrade fastify dependencies by @jaredwray in #215 - root - chore: upgrade hookified by @jaredwray in #216 - root - chore: upgrade Docker Node.js runtime image by @jaredwray in #217 - Run mockhttp.org on a Cloudflare Worker only by @jaredwray in #218 - Use the Docula docs index as the homepage by @jaredwray in #219 **Full diff:** [https://github.com/jaredwray/mockhttp/compare/v1.9.0...v1.10.0](https://github.com/jaredwray/mockhttp/compare/v1.9.0...v1.10.0) ### v1.9.0 URL: https://mockhttp.org/changelog/v1-9-0 Date: August 19, 2026 Tag: Release ## @jaredwray/mockhttp@1.9.0 — 2026-08-19 Stable indexed response-format templates, plus security hardening and dependency refreshes. ### Features - add stable response format output via optional template index (#181) ```bash # Same index → byte-identical JSON. Omit the index for the previous random pick. curl http://localhost:3000/json/1 curl http://localhost:3000/html/1 curl http://localhost:3000/json/99 # → 404 {"error":"Template index must be between 1 and 5"} ``` ### Bug Fixes - clone JSON template per request to protect stable output (#181) ### Internal - assert trailing-slash index requests fail loudly with 404 (#181) - land security docs through zizmor (#182) - stage npm publishes instead of publishing live (#190) - gate staged publishes on Aikido scan-release (#191) - prefer tilde ranges for runtime deps (#192) - record repository lockdown (#193) - remove set-cookie-parser override (#194) - remove @ungap/structured-clone override (#195) - remove glob override (#196) - upgrade @biomejs/biome 2.5.3 → 2.5.8 (#197) - upgrade TypeScript 6.0.3 → 7.0.2, tsdown 0.22.2 → 0.22.14, tsx 4.23.0 → 4.23.12, @swc/core 1.15.43 → 1.15.47 (#198) - upgrade package manager pnpm 11.20.0 → 11.21.0 (#200) - upgrade fastify 5.10.0 → 5.11.3, @fastify/cookie, @fastify/rate-limit, @fastify/static, @fastify/swagger, @fastify/swagger-ui (#201) - upgrade @scalar/api-reference 1.62.5 → 1.64.1 (#202) - upgrade hookified 3.0.1 → 3.0.2 (#203) - prefer caret ranges over tilde (#204) - pin Docker Node.js runtime image to node:24.19.0-alpine3.24 (#205) ### Contributors - @jaredwray (15) ### Full List of Changes - feat: add stable response format output via optional template index by @jaredwray in #181 - mockhttp - chore: defense - land security docs through zizmor by @jaredwray in #182 - mockhttp - chore: defense - stage npm publishes instead of publishing live by @jaredwray in #190 - mockhttp - chore: defense - gate staged publishes on Aikido scan-release by @jaredwray in #191 - mockhttp - chore: defense - prefer tilde ranges for runtime deps by @jaredwray in #192 - mockhttp - chore: defense - record repository lockdown by @jaredwray in #193 - root - chore: remove set-cookie-parser override by @jaredwray in #194 - root - chore: remove @ungap/structured-clone override by @jaredwray in #195 - root - chore: remove glob override by @jaredwray in #196 - root - chore: upgrade code quality dependencies by @jaredwray in #197 - root - chore: upgrade TypeScript and build tooling by @jaredwray in #198 - root - chore: upgrade package manager by @jaredwray in #200 - root - chore: upgrade fastify dependencies by @jaredwray in #201 - root - chore: upgrade @scalar/api-reference by @jaredwray in #202 - root - chore: upgrade hookified by @jaredwray in #203 - root - chore: defense - prefer caret ranges over tilde by @jaredwray in #204 - root - chore: upgrade Docker Node.js runtime image by @jaredwray in #205 **Full diff:** [https://github.com/jaredwray/mockhttp/compare/v1.8.1...v1.9.0](https://github.com/jaredwray/mockhttp/compare/v1.8.1...v1.9.0) ### v1.8.1 URL: https://mockhttp.org/changelog/v1-8-1 Date: July 19, 2026 Tag: Release ## @jaredwray/mockhttp@1.8.1 — 2026-07-18 Dependency maintenance: refresh runtime and build dependencies (incl. @fastify/static v10). ### Internal - update fastify, @fastify/cookie, @fastify/helmet, @fastify/rate-limit, @fastify/swagger, @fastify/swagger-ui to latest (`62d073a`, #174) - update @fastify/static to 10 (major) (`71501e3`, #178) - update @scalar/api-reference to latest (`7efd744`, #176) - update hookified to latest (`f46b91a`, #177) - update @biomejs/biome, @swc/core, tsx to latest (`68584a6`, #175) - update test tooling — vitest, @vitest/coverage-v8 (`c3461d3`, #166) ### Contributors - @jaredwray (6) ### Full List of Changes - chore: update test tooling (vitest, @vitest/coverage-v8) by @jaredwray in #166 - chore: update fastify, @fastify/cookie, @fastify/helmet, @fastify/rate-limit, @fastify/swagger, @fastify/swagger-ui to latest by @jaredwray in #174 - chore: update @biomejs/biome, @swc/core, tsx to latest by @jaredwray in #175 - chore: update @scalar/api-reference to latest by @jaredwray in #176 - chore: update hookified to latest by @jaredwray in #177 - chore: update @fastify/static to 10 (major) by @jaredwray in #178 **Full diff:** [https://github.com/jaredwray/mockhttp/compare/v1.8.0...v1.8.1](https://github.com/jaredwray/mockhttp/compare/v1.8.0...v1.8.1) ### v1.8.0 URL: https://mockhttp.org/changelog/v1-8-0 Date: June 18, 2026 Tag: Release ## @jaredwray/mockhttp@1.8.0 — 2026-06-18 Add request bins for capturing and inspecting HTTP requests; refresh runtime and build dependencies. ### Features - add request bins for inspecting captured HTTP requests (`41e3d20`, #150) Mint an ephemeral URL, send arbitrary requests to it, and read back what was captured — useful for webhook debugging. ```bash # Create a bin, send a request to it, then inspect what was captured ID=$(curl -s -X POST http://localhost:3000/bins | jq -r .id) curl -X POST "http://localhost:3000/b/$ID/webhook?source=stripe" \ -H 'content-type: application/json' \ -d '{"event":"payment.succeeded"}' curl "http://localhost:3000/bins/$ID/requests" | jq ``` ### Documentation - expand Request Bins section with end-to-end examples and API reference (`c860005`, #150) ### Internal - cover MockHttp bin integration; harden against negative `maxRequestsPerBin` (`d6356c1`, #150) - run deploy-site `test` and `build` in parallel, gate deploy on both (`133115d`, #149) - upgrade hookified 2.2.0 → 3.0.0 (`58e0717`, #157) - upgrade @scalar/api-reference 1.55.3 → 1.59.3 (`1209de0`, #156) - upgrade @fastify/swagger-ui 5.2.6 → 6.0.0 (`b37285c`, #155) - upgrade @fastify/rate-limit 10.3.0 → 11.0.0 (`3c7e14a`, #154) - upgrade GitHub Actions — checkout v7, codecov-action v7 (`318c34a`, #153) - upgrade TypeScript and build tooling — @swc/core, tsx, tsdown (`c474f8d`, #152) - upgrade code quality dependencies — biome, vitest (`b06c1e6`, #151) ### Contributors - @jaredwray (11) ### Full List of Changes - ci(deploy-site): run test and build in parallel by @jaredwray in #149 - feat: add request bins for inspecting captured HTTP requests by @jaredwray in #150 - root - chore: upgrade code quality dependencies by @jaredwray in #151 - root - chore: upgrade TypeScript and build tooling by @jaredwray in #152 - root - chore: upgrade GitHub Actions (breaking) by @jaredwray in #153 - root - chore: upgrade @fastify/rate-limit (breaking) by @jaredwray in #154 - root - chore: upgrade @fastify/swagger-ui (breaking) by @jaredwray in #155 - root - chore: upgrade @scalar/api-reference by @jaredwray in #156 - root - chore: upgrade hookified (breaking) by @jaredwray in #157 **Full diff:** [https://github.com/jaredwray/mockhttp/compare/v1.6.1...v1.7.0](https://github.com/jaredwray/mockhttp/compare/v1.6.1...v1.7.0) ### v1.7.0 URL: https://mockhttp.org/changelog/v1-7-0 Date: May 18, 2026 Tag: Release ## @jaredwray/mockhttp@1.6.1 — 2026-05-18 Routine maintenance: dependency refresh (fastify, @scalar/api-reference, hookified), pnpm 11 supply-chain baseline, and GitHub Actions major upgrades. ### Internal - upgrade hookified 2.1.1 → 2.2.0 (`e431858`, #147) - upgrade @scalar/api-reference 1.52.1 → 1.55.3 (`e07afea`, #146) - upgrade @fastify/static 9.1.0→9.1.3, @fastify/swagger-ui 5.2.5→5.2.6, fastify 5.8.4→5.8.5 (`bcfddf6`, #145) - upgrade GitHub Actions to latest majors (checkout v6, setup-node v6, upload-artifact v7, download-artifact v8, codeql v4, etc.) (`a47cf91`, #144) - bump engines.node to >=22.18.0 for tsdown 0.22.0 (`5ab1512`, #143) - upgrade TypeScript 6.0.2 → 6.0.3, tsdown 0.21.7 → 0.22.0, @swc/core 1.15.24 → 1.15.33 (`5cef6c7`, #143) - upgrade Biome 2.4.11 → 2.4.15 and Vitest 4.1.4 → 4.1.6 (`edfdf90`, #142) - disable setup-node v5 package-manager-cache to fix corepack ordering (`8bf7cd1`, #141) - address review feedback on pnpm 11 upgrade (`ca65ce5`, #141) - upgrade to pnpm 11 via corepack with defense-in-depth workspace baseline (`1d93b64`, #141) ### Contributors - @jaredwray (10) ### Full List of Changes - chore: upgrade to pnpm 11 via corepack with defense-in-depth workspace by @jaredwray in #141 - root - chore: upgrade code quality dependencies by @jaredwray in #142 - root - chore: upgrade TypeScript and build tooling by @jaredwray in #143 - root - chore: upgrade GitHub Actions (breaking) by @jaredwray in #144 - root - chore: upgrade fastify dependencies by @jaredwray in #145 - root - chore: upgrade @scalar/api-reference by @jaredwray in #146 - root - chore: upgrade hookified by @jaredwray in #147 **Full diff:** [https://github.com/jaredwray/mockhttp/compare/v1.6.0...v1.6.1](https://github.com/jaredwray/mockhttp/compare/v1.6.0...v1.6.1) ### v1.6.0 URL: https://mockhttp.org/changelog/v1-6-0 Date: May 16, 2026 Tag: Release ## @jaredwray/mockhttp@1.6.0 — 2026-05-16 Flexible URL matching: trailing path segments fall back to the parsable route prefix (fixes #137). ### Features - ignore trailing path segments after the parsable portion (`6f82897`, #139) A Fastify `rewriteUrl` hook progressively strips trailing segments when only the static catch-all wildcard or nothing matches. Query strings are preserved and the first path segment is never stripped, so genuinely unknown URLs still 404. ```http # Before — only an exact match worked: GET /status/429 → 429 GET /status/429/foo → 404 # After — trailing segments fall back to the parsable prefix: GET /status/429 → 429 GET /status/429/foo → 429 (served by /status/:code) GET /status/429/foo/bar/ → 429 GET /status/429?x=1 → 429 (query preserved) GET /totally/unknown → 404 (first segment never stripped) ``` ### Documentation - document flexible URL matching behavior in the README (`148ed17`, #139) ### Internal - extract query string before initial route check; add trailing-slash path coverage (`5f298ea`, #139) - fix typos in README and `src/swagger.ts` (`be2b014`, #138) ### Contributors - @jaredwray — #139 - @mrazauskas — #138 (first contribution 🎉) **Full diff:** [https://github.com/jaredwray/mockhttp/compare/v1.5.1...v1.6.0](https://github.com/jaredwray/mockhttp/compare/v1.5.1...v1.6.0) ### v1.5.1 URL: https://mockhttp.org/changelog/v1-5-1 Date: April 14, 2026 Tag: Release ## What's Changed * chore: upgrading biome, vitest, swc to latest by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/130](https://github.com/jaredwray/mockhttp/pull/130) * chore: upgrading fastify to 5.8.4 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/131](https://github.com/jaredwray/mockhttp/pull/131) * chore: upgrading hookified to 2.1.1 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/132](https://github.com/jaredwray/mockhttp/pull/132) * chore: upgrading @scalar/api-reference to 1.52.1 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/133](https://github.com/jaredwray/mockhttp/pull/133) * chore: migrating from tsup to tsdown by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/134](https://github.com/jaredwray/mockhttp/pull/134) * chore: updating all github actions by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/135](https://github.com/jaredwray/mockhttp/pull/135) * fix: docker publish and updating tsdown by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/136](https://github.com/jaredwray/mockhttp/pull/136) **Full Changelog**: [https://github.com/jaredwray/mockhttp/compare/v1.5.0...v1.5.1](https://github.com/jaredwray/mockhttp/compare/v1.5.0...v1.5.1) ### v1.5.0 URL: https://mockhttp.org/changelog/v1-5-0 Date: March 17, 2026 Tag: Release ## What's Changed * chore: upgrading swc, biome, vitest, and rimraf by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/127](https://github.com/jaredwray/mockhttp/pull/127) * chore: upgrading fastify and scalar by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/128](https://github.com/jaredwray/mockhttp/pull/128) * feat: adding in http2 support by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/129](https://github.com/jaredwray/mockhttp/pull/129) **Full Changelog**: [https://github.com/jaredwray/mockhttp/compare/v1.4.0...v1.5.0](https://github.com/jaredwray/mockhttp/compare/v1.4.0...v1.5.0) ### v1.4.0 URL: https://mockhttp.org/changelog/v1-4-0 Date: February 13, 2026 Tag: Release ## What's Changed * chore: removing route export files from code coverage by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/117](https://github.com/jaredwray/mockhttp/pull/117) * chore: upgrading vitest and support modules to latest by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/118](https://github.com/jaredwray/mockhttp/pull/118) * chore: upgrading fastify and supporting modules to latest by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/119](https://github.com/jaredwray/mockhttp/pull/119) * chore: upgrading pino to 10.3.1 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/120](https://github.com/jaredwray/mockhttp/pull/120) * chore: upgrading hookified to 1.15.1 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/121](https://github.com/jaredwray/mockhttp/pull/121) * feat: adding mock certificate support for ssl testing by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/123](https://github.com/jaredwray/mockhttp/pull/123) * feat: adding mock certificate support for ssl testing by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/122](https://github.com/jaredwray/mockhttp/pull/122) * chore: getting test coverage back to normal levels by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/124](https://github.com/jaredwray/mockhttp/pull/124) * feat: adding in https support in docs by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/125](https://github.com/jaredwray/mockhttp/pull/125) **Full Changelog**: [https://github.com/jaredwray/mockhttp/compare/v1.3.0...v1.4.0](https://github.com/jaredwray/mockhttp/compare/v1.3.0...v1.4.0) ### v1.3.0 URL: https://mockhttp.org/changelog/v1-3-0 Date: January 12, 2026 Tag: Release ## What's Changed * fix: [Aikido] Fix security issue in glob via minor version upgrade from 11.0.3 to 11.1.0 by @aikido-autofix[bot] in [https://github.com/jaredwray/mockhttp/pull/107](https://github.com/jaredwray/mockhttp/pull/107) * chore: upgrading vitest to 4.0.16 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/109](https://github.com/jaredwray/mockhttp/pull/109) * chore: upgrading hookified to 1.15.0 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/110](https://github.com/jaredwray/mockhttp/pull/110) * chore: upgrading pino to 10.1.1 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/111](https://github.com/jaredwray/mockhttp/pull/111) * chore: upgrading fastify modules to latest by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/112](https://github.com/jaredwray/mockhttp/pull/112) * feat: adding in meta descriptions by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/113](https://github.com/jaredwray/mockhttp/pull/113) * chore: pin set-cookie-parser to 2.7.2 to mitigate prototype pollution by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/114](https://github.com/jaredwray/mockhttp/pull/114) * feat: implement httpbin Dynamic Data endpoints by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/115](https://github.com/jaredwray/mockhttp/pull/115) ## New Contributors * @aikido-autofix[bot] made their first contribution in [https://github.com/jaredwray/mockhttp/pull/107](https://github.com/jaredwray/mockhttp/pull/107) **Full Changelog**: [https://github.com/jaredwray/mockhttp/compare/v1.2.0...v1.3.0](https://github.com/jaredwray/mockhttp/compare/v1.2.0...v1.3.0) ### v1.2.0 URL: https://mockhttp.org/changelog/v1-2-0 Date: December 12, 2025 Tag: Release ## What's Changed * chore: moving to nodejs 24 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/100](https://github.com/jaredwray/mockhttp/pull/100) * chore: upgradint tsup to 8.5.1 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/101](https://github.com/jaredwray/mockhttp/pull/101) * chore: upgrading hookified to 1.14.0 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/102](https://github.com/jaredwray/mockhttp/pull/102) * chore: upgrading vitest to 4.0.15 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/103](https://github.com/jaredwray/mockhttp/pull/103) * chore: upgrading @scalar/api-reference to 1.40.4 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/104](https://github.com/jaredwray/mockhttp/pull/104) * chore: upgrading @biomejs/biome to 2.3.8 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/105](https://github.com/jaredwray/mockhttp/pull/105) * feat: ability to disable logging by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/106](https://github.com/jaredwray/mockhttp/pull/106) **Full Changelog**: [https://github.com/jaredwray/mockhttp/compare/v1.1.0...v1.2.0](https://github.com/jaredwray/mockhttp/compare/v1.1.0...v1.2.0) ### v1.1.0 URL: https://mockhttp.org/changelog/v1-1-0 Date: November 11, 2025 Tag: Release ## What's Changed * chore: removing minify as it causes debugging issues by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/91](https://github.com/jaredwray/mockhttp/pull/91) * fix: updating readme with correct spelling by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/92](https://github.com/jaredwray/mockhttp/pull/92) * chore: upgrading vitest to 4.0.8 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/93](https://github.com/jaredwray/mockhttp/pull/93) * chore: upgrading pino to 10.1.0 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/94](https://github.com/jaredwray/mockhttp/pull/94) * chore: upgrading hookified to 1.13.0 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/95](https://github.com/jaredwray/mockhttp/pull/95) * chore: upgrading fastify to 5.6.2 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/96](https://github.com/jaredwray/mockhttp/pull/96) * feat: adding in image routes by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/97](https://github.com/jaredwray/mockhttp/pull/97) * feat: adding in rate limit options by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/98](https://github.com/jaredwray/mockhttp/pull/98) * feat: making rate limiting enabled by default by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/99](https://github.com/jaredwray/mockhttp/pull/99) **Full Changelog**: [https://github.com/jaredwray/mockhttp/compare/v1.0.1...v1.1.0](https://github.com/jaredwray/mockhttp/compare/v1.0.1...v1.1.0) ### v1.0.1 URL: https://mockhttp.org/changelog/v1-0-1 Date: October 7, 2025 Tag: Release ## What's Changed * fix: delete endpoing allows string, JSON, or any by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/90](https://github.com/jaredwray/mockhttp/pull/90) **Full Changelog**: [https://github.com/jaredwray/mockhttp/compare/v1.0.0...v1.0.1](https://github.com/jaredwray/mockhttp/compare/v1.0.0...v1.0.1) ### v1.0.0 URL: https://mockhttp.org/changelog/v1-0-0 Date: October 7, 2025 Tag: Release ## What's Changed * fix: docker no longer runs as default user by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/80](https://github.com/jaredwray/mockhttp/pull/80) * chore: upgrading @biomejs/biome to 2.2.5 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/81](https://github.com/jaredwray/mockhttp/pull/81) * chore: upgrading pino to 10.0.0 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/82](https://github.com/jaredwray/mockhttp/pull/82) * chore: upgrading hookified to 1.12.1 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/83](https://github.com/jaredwray/mockhttp/pull/83) * chore: upgrading fastify to 5.6.1 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/84](https://github.com/jaredwray/mockhttp/pull/84) * feat: adding in injection taps by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/85](https://github.com/jaredwray/mockhttp/pull/85) * fix: delete should allow strings or json to be passed by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/86](https://github.com/jaredwray/mockhttp/pull/86) * feat: adding minification to build by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/87](https://github.com/jaredwray/mockhttp/pull/87) * feat: adding function for tap injections by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/88](https://github.com/jaredwray/mockhttp/pull/88) * feat: updating documentation for taps by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/89](https://github.com/jaredwray/mockhttp/pull/89) **Full Changelog**: [https://github.com/jaredwray/mockhttp/compare/v0.9.0...v1.0.0](https://github.com/jaredwray/mockhttp/compare/v0.9.0...v1.0.0) ### v0.9.0 URL: https://mockhttp.org/changelog/v0-9-0 Date: August 27, 2025 Tag: Release ## What's Changed * feat: adding in multiple http methods for plain, html, and text by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/78](https://github.com/jaredwray/mockhttp/pull/78) **Full Changelog**: [https://github.com/jaredwray/mockhttp/compare/v0.8.0...v0.9.0](https://github.com/jaredwray/mockhttp/compare/v0.8.0...v0.9.0) ### v0.8.0 URL: https://mockhttp.org/changelog/v0-8-0 Date: August 27, 2025 Tag: Release ## What's Changed * feat: adding in plain endpoint by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/74](https://github.com/jaredwray/mockhttp/pull/74) * feat: adding in text endpoint by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/75](https://github.com/jaredwray/mockhttp/pull/75) * feat: adding in html endpoint by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/76](https://github.com/jaredwray/mockhttp/pull/76) * fix: removing eslint by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/77](https://github.com/jaredwray/mockhttp/pull/77) **Full Changelog**: [https://github.com/jaredwray/mockhttp/compare/v0.7.0...v0.8.0](https://github.com/jaredwray/mockhttp/compare/v0.7.0...v0.8.0) ### v0.7.0 URL: https://mockhttp.org/changelog/v0-7-0 Date: August 23, 2025 Tag: Release ## What's Changed * feat: adding in custom traffic badge by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/65](https://github.com/jaredwray/mockhttp/pull/65) * feat: adding in auth with basic, bearer, digest by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/66](https://github.com/jaredwray/mockhttp/pull/66) * chore: upgrading typescript to 5.9.2 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/67](https://github.com/jaredwray/mockhttp/pull/67) * chore: upgrading codecov to v5 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/68](https://github.com/jaredwray/mockhttp/pull/68) * chore: upgrading pino to 9.9.0 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/69](https://github.com/jaredwray/mockhttp/pull/69) * chore: upgrading hookified to 1.12.0 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/70](https://github.com/jaredwray/mockhttp/pull/70) * chore: upgrading fastify to 5.5.0 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/71](https://github.com/jaredwray/mockhttp/pull/71) * chore: migrating from xo to biome by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/72](https://github.com/jaredwray/mockhttp/pull/72) * fix: adding error on warnings for biome check by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/73](https://github.com/jaredwray/mockhttp/pull/73) **Full Changelog**: [https://github.com/jaredwray/mockhttp/compare/v0.6.1...v0.6.2](https://github.com/jaredwray/mockhttp/compare/v0.6.1...v0.6.2) ### v0.6.1 URL: https://mockhttp.org/changelog/v0-6-1 Date: July 19, 2025 Tag: Release ## What's Changed * chore: adding in min for cloud run by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/60](https://github.com/jaredwray/mockhttp/pull/60) * chore: upgrading xo to 1.2.1 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/61](https://github.com/jaredwray/mockhttp/pull/61) * chore: upgrading vitest to 3.2.4 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/62](https://github.com/jaredwray/mockhttp/pull/62) * chore: upgrading @scalar/api-reference to 1.32.9 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/63](https://github.com/jaredwray/mockhttp/pull/63) * chore: upgrading hookified to 1.10.0 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/64](https://github.com/jaredwray/mockhttp/pull/64) **Full Changelog**: [https://github.com/jaredwray/mockhttp/compare/v0.6.0...v0.6.1](https://github.com/jaredwray/mockhttp/compare/v0.6.0...v0.6.1) ### v0.6.0 URL: https://mockhttp.org/changelog/v0-6-0 Date: June 14, 2025 Tag: Release ## What's Changed * fix: adding in application/json for return time on cookies by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/52](https://github.com/jaredwray/mockhttp/pull/52) * chore: upgrading vitest to 3.2.3 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/53](https://github.com/jaredwray/mockhttp/pull/53) * chore: upgrading tsup to 8.5.0 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/54](https://github.com/jaredwray/mockhttp/pull/54) * chore: upgrading pino to 9.7.0 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/55](https://github.com/jaredwray/mockhttp/pull/55) * chore: upgrading hookified to 1.9.1 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/56](https://github.com/jaredwray/mockhttp/pull/56) * chore: upgrading xo to 1.1.0 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/57](https://github.com/jaredwray/mockhttp/pull/57) * chore: upgrading fastify to 5.4.0 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/58](https://github.com/jaredwray/mockhttp/pull/58) * feat: adding in the anything route from httpbin by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/59](https://github.com/jaredwray/mockhttp/pull/59) **Full Changelog**: [https://github.com/jaredwray/mockhttp/compare/v0.5.0...v0.6.0](https://github.com/jaredwray/mockhttp/compare/v0.5.0...v0.6.0) ### v0.5.0 URL: https://mockhttp.org/changelog/v0-5-0 Date: May 10, 2025 Tag: Release ## What's Changed * chore: updating github actions and scripts by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/45](https://github.com/jaredwray/mockhttp/pull/45) * chore: upgrading @swc/core and tsx to latest by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/46](https://github.com/jaredwray/mockhttp/pull/46) * chore: upgrading vitest to 3.1.3 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/47](https://github.com/jaredwray/mockhttp/pull/47) * chore: upgrading hookified to 1.9.0 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/48](https://github.com/jaredwray/mockhttp/pull/48) * chore: upgrading fastify to 5.3.2 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/49](https://github.com/jaredwray/mockhttp/pull/49) * feat: moving docker to get external packaging by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/50](https://github.com/jaredwray/mockhttp/pull/50) * feat: adding in cookies from httpbin by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/51](https://github.com/jaredwray/mockhttp/pull/51) **Full Changelog**: [https://github.com/jaredwray/mockhttp/compare/v0.4.3...v0.5.0](https://github.com/jaredwray/mockhttp/compare/v0.4.3...v0.5.0) ### v0.4.3 URL: https://mockhttp.org/changelog/v0-4-3 Date: April 5, 2025 Tag: Release ## What's Changed * fix: fixing workflows to use npm for docker by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/44](https://github.com/jaredwray/mockhttp/pull/44) **Full Changelog**: [https://github.com/jaredwray/mockhttp/compare/v0.4.2...v0.4.3](https://github.com/jaredwray/mockhttp/compare/v0.4.2...v0.4.3) ### v0.4.2 URL: https://mockhttp.org/changelog/v0-4-2 Date: April 5, 2025 Tag: Release ## What's Changed * fix: updating the description in swagger definition by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/34](https://github.com/jaredwray/mockhttp/pull/34) * feat: adding in auto port detection by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/35](https://github.com/jaredwray/mockhttp/pull/35) * chore: migrating to pnpm for workflows by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/36](https://github.com/jaredwray/mockhttp/pull/36) * chore: upgrading vitest to 3.1.1 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/37](https://github.com/jaredwray/mockhttp/pull/37) * chore: upgrading typescript to 5.8.3 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/38](https://github.com/jaredwray/mockhttp/pull/38) * chore: upgrading hookified to 1.8.1 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/39](https://github.com/jaredwray/mockhttp/pull/39) * chore: upgrading fastify to 5.2.2 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/40](https://github.com/jaredwray/mockhttp/pull/40) * chore: upgrading @swc/core to 1.11.16 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/41](https://github.com/jaredwray/mockhttp/pull/41) * chore: upgrading @scalar/api-reference to 1.28.12 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/42](https://github.com/jaredwray/mockhttp/pull/42) * feat: adding in docker compose example by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/43](https://github.com/jaredwray/mockhttp/pull/43) **Full Changelog**: [https://github.com/jaredwray/mockhttp/compare/v0.4.1...v0.4.2](https://github.com/jaredwray/mockhttp/compare/v0.4.1...v0.4.2) ### v0.4.1 URL: https://mockhttp.org/changelog/v0-4-1 Date: March 1, 2025 Tag: Release ## What's Changed * chore: upgrading tsup, tsx, and typescript to latest by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/29](https://github.com/jaredwray/mockhttp/pull/29) * chore: upgrading vitest to 3.0.7 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/30](https://github.com/jaredwray/mockhttp/pull/30) * chore: upgrading hookified to 1.7.1 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/31](https://github.com/jaredwray/mockhttp/pull/31) * chore: upgrading swc to 1.11.5 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/32](https://github.com/jaredwray/mockhttp/pull/32) * chore: upgrading fastify and scalar modules to latest by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/33](https://github.com/jaredwray/mockhttp/pull/33) **Full Changelog**: [https://github.com/jaredwray/mockhttp/compare/v0.4.0...v0.4.1](https://github.com/jaredwray/mockhttp/compare/v0.4.0...v0.4.1) ### v0.4.0 URL: https://mockhttp.org/changelog/v0-4-0 Date: January 26, 2025 Tag: Release ## What's Changed * feat: adding in the start of mockhttp class by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/28](https://github.com/jaredwray/mockhttp/pull/28) **Full Changelog**: [https://github.com/jaredwray/mockhttp/compare/v0.3.0...v0.4.0](https://github.com/jaredwray/mockhttp/compare/v0.3.0...v0.4.0) ### v0.3.0 URL: https://mockhttp.org/changelog/v0-3-0 Date: January 25, 2025 Tag: Release ## What's Changed * chore: upgrading vitest to 3.0.4 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/21](https://github.com/jaredwray/mockhttp/pull/21) * chore: upgrading typescript to 5.7.3 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/22](https://github.com/jaredwray/mockhttp/pull/22) * chore: upgrading tsup and scalar to latest by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/23](https://github.com/jaredwray/mockhttp/pull/23) * chore: upgrading fastify to 5.2.1 and modules to latest by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/24](https://github.com/jaredwray/mockhttp/pull/24) * feat: moving concurrency on cloud run to 500 by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/25](https://github.com/jaredwray/mockhttp/pull/25) * feat: adding in description on main page by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/26](https://github.com/jaredwray/mockhttp/pull/26) * feat: adding in redirects by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/27](https://github.com/jaredwray/mockhttp/pull/27) **Full Changelog**: [https://github.com/jaredwray/mockhttp/compare/v0.2.3...v0.3.0](https://github.com/jaredwray/mockhttp/compare/v0.2.3...v0.3.0) ### v0.2.3 URL: https://mockhttp.org/changelog/v0-2-3 Date: December 31, 2024 Tag: Release ## What's Changed * removing CORS as its is not needed by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/17](https://github.com/jaredwray/mockhttp/pull/17) * feat: adding in robots.txt file by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/18](https://github.com/jaredwray/mockhttp/pull/18) * feat: adding in sitemap.xml by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/19](https://github.com/jaredwray/mockhttp/pull/19) * chore: upgrading modules to latest by @jaredwray in [https://github.com/jaredwray/mockhttp/pull/20](https://github.com/jaredwray/mockhttp/pull/20) **Full Changelog**: [https://github.com/jaredwray/mockhttp/compare/v0.2.2...v0.2.3](https://github.com/jaredwray/mockhttp/compare/v0.2.2...v0.2.3)