Moxy (or moxy) is a programmable mock proxy. It is an HTTP proxy exposing web hooks that you can use in order to tell it what to do, and when to do it.

Learn more ยป

Quick Start

Run gem install moxy

As a system executable

$ moxy  # no arguments, default to localhost, 9292
$ moxy 3000 

As a Web app

$ git clone
$ cd moxy; rackup

A web app is great for a dedicated integration server. Moxy will run on any rack handler.

Using Moxy

1. Set http://moxy-host:port as a system proxy, or a proxy in your HTTP library in your code.

2. Issue any number of POSTs to your http://moxy-host:port/__setup__ endpoint with a POST variable named mock_text.

Below are some examples of mock_text (in each, second line describes result).

stub_request :get, ""
(Returns an empty content with 200 HTTP status code)
stub_request(:get, "").to_return(:body => "boo hoo!")
(Returns boo hoo! as content)
stub_request(:get, "").to_return(:body => "boo hoo!", :code => 500)
(Returns boo hoo! as content)

Find out more

Moxy can become a very powerful tool for daily tasks or automated testing. Check out moxy at Github for more details and examples.

Fork me on GitHub