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:
| Request | Result |
|---|---|
GET https://api.example.com/users | HTTPeep returns your local inline content |
| Any other request | HTTPeep 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:
| Field | Value |
|---|---|
| Protocol | https |
| Domain | api.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/usersThe 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: nullBecause 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
Optional: import the rule via deeplink
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==When you click the link, HTTPeep will:
- Launch the main window
- Show a confirmation dialog with the rule summary
- 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.jsonThis 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
Rule engine
Learn the full Match -> Actions -> Resolve -> Response pipeline, including chaining actions and using the three resolve exits.
Breakpoint debugging
Pause any request mid-flight, edit headers or the body, and then pass or abort.
Network throttling
Add delays, bandwidth limits, and random failures to simulate real network conditions.
Rules as Code
Version-control your rules, use branches per environment, and share configurations with your team.