No commit activity in last 3 years
No release in over 3 years
Rack middleware to support magic cookie on clients
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

HttpMonkey::Cookie

Rack middleware to use with HttpMonkey and support magic cookies on your requests.

TOC:

  • Installation
  • Usage
  • Notes

Installation

Add this line to your application's Gemfile:

gem 'http_monkey-cookie'

And then execute:

$ bundle

Or install it yourself as:

$ gem install http_monkey-cookie

Usage

require "http_monkey"
require "http_monkey/cookie"

HttpMonkey.configure do
  # Default HTTP Headers (to all requests)
  middlewares.use HttpMonkey::M::Cookie
end

response = HttpMonkey.at("http://domain.com").get
# Returns Set-Cookie: token=magic;Version=1;Comment=;Domain=.domain.com;Path=/;Max-Age=999999999;httpOnly

HttpMonkey.at("http://domain.com/service").get
# Uses Cookie: token=magic etc.

HttpMonkey.at("http://example.com").get
# Don't send cookies

Notes

This version is experimental and can explode in any moment.

Some resources to build a new cookie project: