Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eagletmt/faraday_middleware-cookiejar
Faraday middleware for managing cookies
https://github.com/eagletmt/faraday_middleware-cookiejar
Last synced: 22 days ago
JSON representation
Faraday middleware for managing cookies
- Host: GitHub
- URL: https://github.com/eagletmt/faraday_middleware-cookiejar
- Owner: eagletmt
- License: mit
- Created: 2013-03-24T07:33:48.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-03-24T08:11:18.000Z (almost 12 years ago)
- Last Synced: 2024-12-01T07:41:02.595Z (25 days ago)
- Language: Ruby
- Size: 103 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# FaradayMiddleware::Cookiejar
[![Build Status](https://travis-ci.org/eagletmt/faraday_middleware-cookiejar.png?branch=master)](https://travis-ci.org/eagletmt/faraday_middleware-cookiejar)Faraday middleware for managing cookies
## Installation
Add this line to your application's Gemfile:
gem 'faraday_middleware-cookiejar', :git => 'git://github.com/eagletmt/faraday_middleware-cookiejar.git'
And then execute:
$ bundle
## Usage
```ruby
require 'faraday'
require 'faraday_middleware/cookiejar'conn = Faraday::Connection.new do |builder|
builder.url_prefix = 'http://www.example.com/'
builder.use Faraday::Request::UrlEncoded
builder.use FaradayMiddleware::CookieJar
builder.adapter Faraday.default_adapter
endconn.post '/login', { :username => 'eagletmt', :password => 'PASSWORD' }
conn.get '/'
```## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request