← Back to Home
Tutorial

Testing API Resilience with Curl & Chaos Proxy on MacOS

Updated December 2025 • 2 min read

You don't always need a complex UI or a mobile device to test how your API handles failures. Sometimes, you just want to run a quick curl command in your terminal to see if your backend handles a 503 error or a 7-second delay correctly.

In this guide, we'll set up a Chaos Proxy rule and route our terminal traffic through it.

💡

Need a UI for this? If you prefer GUI tools over terminal, read our guide on Proxyman vs Charles Proxy alternatives.

Step 1: Configure the Chaos Rule

First, we need to tell Debuggo what to break. Log in to your dashboard and create a new rule with the following parameters:

  • Rule NameChaos Test 1
  • URL Pattern (Regex)httpbin.org (Matches any URL containing this string)
  • Delay7 seconds (Simulates lag)
  • Failure Rate1 (100% of requests will fail)
  • Error CodePro503 (Service Unavailable)
  • MethodProGET (Optional)

Step 2: Start the Session

Click the Start button in the dashboard. Debuggo will spin up a dedicated cloud proxy instance for you.

Step 3: Trust the Certificate (MacOS)

To inspect HTTPS traffic (like https://httpbin.org), you need to trust the Debuggo CA certificate locally.

  1. Download mitmproxy-ca-cert.pem from the dashboard.
  2. Open Keychain Access on your Mac.
  3. Drag and drop the file into the System keychain.
  4. Double click the certificate, expand "Trust", and select "Always Trust".

Step 4: Run the Command

Now, use curl with the -x flag to route traffic through Debuggo. Copy your specific credentials from the dashboard.

curl -v -x http://chaos:5mwit2jsf8v548tj@chaos-proxy.debuggo.app:13979 https://httpbin.org/get

What to expect:

  • You will see a 7-second delay before the response.
  • You will see HTTP/2 503 Service Unavailable instead of 200 OK.
  • The -v flag will show you the full headers, confirming the traffic went through the proxy.

Next Step: Simulate backend failures. Read Stop Testing Success. Kill the Database.

Automate with AI

Still testing manually?

Automate network resilience testing with Debuggo AI. Generate UI and API tests in minutes.

Learn more on debuggo.app →