Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Ruby client for Poxy, a weird service to capture requests, and do stuff with them.
Ruby
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
lib
test
.gems
.gitignore
.yardopts
Gemfile
Guardfile
LICENSE.md
README.html
README.md
Rakefile
apiary.apib
poxy.conf
poxy_client.gemspec

README.md

poxy_client

Poxy is a web application that captures HTTP requests to let you do fun stuff with them.

Fun things like proxying, forwarding, emailing and some sort of processing (soon!).

In order to use it first you'll need to create an account into the site.

Installation

Bundler

Add this line to your application's Gemfile:

gem 'poxy_client'

And then execute:

$ bundle

Manual

$ gem install poxy_client

API Blueprint and Documentation

Courtesy of the great service Apiary.io, here it is: http://docs.poxy.apiary.io/

Usage

There are a few different ways to use the client.

The distribution includes an executable file that you can use. It requires a .config file.

Or, you can implement your own client suited to your particular needs. Take a look at the executable file, or check the code documentation.

Executable

In the /lib folder of the distribution, there's a file named poxyd.rb which you can run from the commandline.

It requires a mandatory config file (included in the distribution you'll find a sample one, here poxy.conf.

You can use that as a start (it points to a test endpoint in the poxy api).

Optionally, you can pass a -d parameter, and the executable will run as a daemon.

Sample run:

$ ruby poxyd.rb -c poxy.conf -d

Being poxy.conf a config file with your own API key.

Custom implementation

The code for PoxyClient it's pretty straightforward.

The PoxyClient#perform method encapsulates the 3 operations the client performs in order to retrieve, process and repeat a request.

Retrieve

Parse

Repeat

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
Something went wrong with that request. Please try again.