Create your first Rule

Get HTTPeep running in under one minutes: start the proxy, capture a real request, create a map-local inline-content rule, and verify it works.

This guide walks you through the shortest useful HTTPeep workflow: start the proxy, confirm traffic is captured, then create one rule that replaces a real response with local inline content.

Complete Installation first. The root CA must be trusted before HTTPS requests will appear in the traffic list.

What you will build

You will create an enabled rule with this behavior:

RequestResult
GET https://api.example.com/usersHTTPeep returns your local inline content
Any other requestHTTPeep lets the request continue normally

1. Start capturing traffic

Open HTTPeep. Click the Start button in the top toolbar to enable the system proxy. The button turns green and a status indicator confirms the proxy is active.

HTTPeep listens on 127.0.0.1:8080 by default. Your system proxy settings are updated automatically - traffic from your browser and most desktop apps flows through HTTPeep immediately.

Open your browser and visit any URL, for example https://example.com. Within a second or two you will see the request appear in HTTPeep's session list.

Click the row to inspect it. The Request and Response tabs show headers, body, timing, and status code.

Select any session and check that the URL, status code, and response body are visible. If the list stays empty, finish the proxy and certificate setup before continuing.

2. Create a map-local inline-content rule

A map-local inline-content rule intercepts matching requests and returns content stored directly in the rule. In the rule file this resolve type is map_local_inline_content.

In HTTPeep, click Rules in the sidebar, then click + New Rule.

Use a clear description, for example Quickstart - Mock users API.

Under Match, configure the request you want to replace:

FieldValue
Protocolhttps
Domainapi.example.com
Path/users

You can use wildcards in both the domain and path fields. For example, *.example.com matches all subdomains.

Under Resolve, choose Map Local, then select Inline Content and paste:

{
  "users": [
    { "id": 1, "name": "Alice" },
    { "id": 2, "name": "Bob" }
  ]
}

Leave Request Actions and Response Actions empty for now.

Toggle the rule to Enabled and save it. The rule should now appear in your rules list with the enabled state on.

3. Test the rule

Make a request to the matched URL:

curl https://api.example.com/users

The response should be the inline content you entered in the rule editor.

In HTTPeep, open the captured session and check:

  • The request URL is https://api.example.com/users
  • The response body matches your inline content
  • The session shows that the request was resolved by your rule

Optional: edit the rule as YAML

HTTPeep stores rules in ~/.httpeep/rules/rule.yaml. You can use the app UI for normal editing, or edit the YAML file directly when you want rules under version control.

- id: rule_quickstart_map_local_inline_users
  description: Quickstart - Mock users API
  enabled: true
  match:
    domains:
    - type: exact
      value: api.example.com
    originProtocol: https
    port: null
    path:
      type: exact
      value: /users
    query: null
    method: null
    headers: null
  resolve:
    type: map_local_inline_content
    content: |-
      {
        "users": [
          { "id": 1, "name": "Alice" },
          { "id": 2, "name": "Bob" }
        ]
      }
    mimeType: null
    statusCode: null
    headers: null

Because rules are plain YAML files, you can:

  • Edit them directly in any text editor
  • Commit them to Git and track changes over time
  • Share them with teammates by pushing to a shared repository
  • Use different rule files for different environments or projects

HTTPeep supports importing rules directly via a httpeep:// deeplink. Clicking the link opens the app and prompts you to confirm before adding the rule.

Inline import (payload in URL)

The quickest way to import this rule is to use an inline deeplink with a Base64-encoded JSON payload:

httpeep://rule/import?scope=inline&payload=WwogICB7CiAgICAgICJpZCI6ICJydWxlX3F1aWNrc3RhcnRfbWFwX2xvY2FsX2lubGluZV91c2VycyIsCiAgICAgICJkZXNjcmlwdGlvbiI6ICJRdWlja3N0YXJ0IC0gTW9jayB1c2VycyBBUEkiLAogICAgICAiZW5hYmxlZCI6IHRydWUsCiAgICAgICJtYXRjaCI6IHsKICAgICAgICAgImRvbWFpbnMiOiBbCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgInR5cGUiOiAiZXhhY3QiLAogICAgICAgICAgICAgICAidmFsdWUiOiAiYXBpLmV4YW1wbGUuY29tIgogICAgICAgICAgICB9CiAgICAgICAgIF0sCiAgICAgICAgICJvcmlnaW5Qcm90b2NvbCI6ICJodHRwcyIsCiAgICAgICAgICJwb3J0IjogbnVsbCwKICAgICAgICAgInBhdGgiOiB7CiAgICAgICAgICAgICJ0eXBlIjogImV4YWN0IiwKICAgICAgICAgICAgInZhbHVlIjogIi91c2VycyIKICAgICAgICAgfSwKICAgICAgICAgInF1ZXJ5IjogbnVsbCwKICAgICAgICAgIm1ldGhvZCI6IG51bGwsCiAgICAgICAgICJoZWFkZXJzIjogbnVsbAogICAgICB9LAogICAgICAicmVzb2x2ZSI6IHsKICAgICAgICAgInR5cGUiOiAibWFwX2xvY2FsX2lubGluZV9jb250ZW50IiwKICAgICAgICAgImNvbnRlbnQiOiAie1xuICBcInVzZXJzXCI6IFtcbiAgICB7IFwiaWRcIjogMSwgXCJuYW1lXCI6IFwiQWxpY2VcIiB9LFxuICAgIHsgXCJpZFwiOiAyLCBcIm5hbWVcIjogXCJCb2JcIiB9XG4gIF1cbn0iLAogICAgICAgICAibWltZVR5cGUiOiBudWxsLAogICAgICAgICAic3RhdHVzQ29kZSI6IG51bGwsCiAgICAgICAgICJoZWFkZXJzIjogbnVsbAogICAgICB9CiAgIH0KXQ==

Import Quickstart Rule →

When you click the link, HTTPeep will:

  1. Launch the main window
  2. Show a confirmation dialog with the rule summary
  3. Append the rule to your list after you click Continue

The import is append-only. If a rule with the same ID already exists, the entire import is rejected so nothing is accidentally overwritten.

Import from a GitHub repository

For teams or public rule collections, host rules in a GitHub repo and reference them by path:

httpeep://rule/import?scope=repo&repo=HTTPeep/httpeep-deeplink&ref=main&path=rules/quickstart.json

This is useful when you want version-controlled rules that can be shared across your team.

Rule did not match? Check these first

  • Condition mismatch: domain, path, or protocol does not exactly match the request
  • Rule order: an earlier rule matched first and terminated processing
  • Rule disabled: the rule switch is off, or edits were not saved
  • Proxy not active: the system proxy is off, or the app making the request does not use the system proxy

If you need a full execution model, continue with Rule engine.

Run httpeep-cli --version to confirm the CLI is available. You can manage rules, list sessions, and start the proxy entirely from the terminal - useful for CI environments and SSH workflows. See the CLI reference for details.

Next steps

On this page