Capturing Requests

Learn how HookReplay captures and stores webhook requests for inspection and debugging.

How Capture Works

When an external service sends a webhook to your HookReplay endpoint URL, the following happens:

  1. HookReplay receives the HTTP request
  2. The request method, headers, body, query parameters, and metadata are captured
  3. The request is stored in your endpoint's history
  4. A 200 OK response is returned to the sender
  5. If streaming is enabled (Pro), the request is also forwarded to your destination URL

What Gets Captured

Every captured request includes:

HTTP Method

GET, POST, PUT, PATCH, DELETE, or any other HTTP method.

Headers

All HTTP headers including Content-Type, Authorization, custom headers, etc.

Request Body

The full payload - JSON, form data, XML, or raw body content.

Query String

URL query parameters like ?event=created&id=123.

Timestamp

Exact date and time when the request was received.

Source IP

The IP address that sent the webhook request.

Viewing Captured Requests

Navigate to your endpoint's detail page to see all captured requests. Click on any request to view its full details:

Request Detail View
┌─────────────────────────────────────────────────────┐
│ POST Request                                        │
│ Captured: Jan 15, 2024 14:32:15                     │
├─────────────────────────────────────────────────────┤
│ Headers                                             │
│ ├─ Content-Type: application/json                   │
│ ├─ X-Stripe-Signature: t=1234567890,v1=abc123...   │
│ └─ User-Agent: Stripe/1.0                           │
├─────────────────────────────────────────────────────┤
│ Body (JSON)                                         │
│ {                                                   │
│   "id": "evt_1234567890",                          │
│   "type": "payment_intent.succeeded",              │
│   "data": { ... }                                  │
│ }                                                   │
└─────────────────────────────────────────────────────┘

Real-Time Updates

The endpoint detail page automatically updates in real-time when new webhooks arrive. You'll see new requests appear at the top of the list without needing to refresh the page.

Tip

Keep the endpoint page open while testing to see webhooks arrive in real-time!

Request Versioning

When you modify a request's body or headers before replaying, HookReplay can save these modifications as versions. This is useful for:

  • Testing different payload variations
  • Fixing incorrect data before replaying
  • Creating test scenarios from real webhooks
Version History

Each version is saved with an optional comment so you can track what changed and why.

Testing Webhook Capture

You can test your endpoint by sending a request with curl:

curl
curl -X POST https://hookreplay.dev/hook/your-token \
  -H "Content-Type: application/json" \
  -d '{"event": "test", "data": {"message": "Hello, HookReplay!"}}'

The response will confirm the webhook was received:

Response
{
  "success": true,
  "message": "Webhook received",
  "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "timestamp": "2024-01-15T14:32:15.123Z"
}