Skip to content
A proxy server for debugging HTTP requests.
CSS JavaScript Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

AutoResponse - HTTP debugging tool for Linux and Mac

What's auto_response for?

Fiddler is the favor tool of many web developers for debugging HTTP web apps. However it is only available on Windows. AutoResponse ports the most used feature of fiddler, 'auto respond', to Linux and Mac world.

Auto_response acts as a proxy server like Fiddler does, allowing you to modify the content of HTTP response.

Quick start

  1. requirements

    • *nix system, Mac/Linux
    • ruby 1.9+ (may work on 1.8.7, but not very well tested)
  2. Install and run

    gem install 'auto_response'
    auto_resp start
    auto_resp status #check server status
    auto_resp stop   #stop proxy server
  3. Set your browser proxy to ''

  4. Edit the configuration file to modify the urls you want change the response.

    By default, the configuration file is located at: $HOME/.auto_response/rules

Response rules

# Examples:

# just respond with status number
url ""
r 404

# if you want to respond all requests with url 
# equals "" with "Hello world!" :
url "" 
r "Hello world" 

# or you can respond with Array
url ""
r [200, {}, "Got replaced"] #[status, header, body]

# if you want to respond these requests with a file:
# this url will be responded with content of somefile.txt
# you can set headers and body in 'somefile.txt'
url "" 
goto "/home/youruser/somefile.txt"

# redirect to another url
url "" 
goto ""

# respond with text setting headers
url ""
r <<-RESP
    Test-Msg      : http-header-example
    header-server : Auto-Responder
    Content-Type  : text/html; charset=utf-8

    <!Doctype html>
    <html><body><h1>Hello world!</h1></body></html>

# match with regexp
url %r{http://pnq\.cc}
r "Any request made to will be responded with this message."

# regular expression and params
url %r{http://anysite\.cc(.*)} do |uri, path|
    Content-Type  : text/html; charset=utf-8

      body { font-size: 50pt; }
      em { color: #ff7300; }
      small { color: #ccc; }

    With regular expression, you can do more powerful things.  <br/> 
    You're requesting <em>#{path}</em> <br/>
    <small>Server time is #{} now. </small>

# delay every images with 1 second
url %r{\.(jpe?g|gif|png)$}
delay 1

# use `delay` together with other response, just simple:
url ""
delay 10
r "Delayed with 10 seconds"


  • GUI monitor showing sessions
Something went wrong with that request. Please try again.