Class: EventMachine::HttpClient::CookieJar

### Home Classes Methods

### In Files

- lib/em-http/client.rb

### Parent

Object

### Methods

- ::new
- #get
- #set

### Class/Module Index

Quicksearch

- EventMachine
- EventMachine::HTTPMethods
- EventMachine::HttpClient
- EventMachine::HttpClient::CookieJar
- EventMachine::HttpConnection
- EventMachine::HttpDecoders
- EventMachine::HttpDecoders::Base
- EventMachine::HttpDecoders::DecoderError
- EventMachine::HttpDecoders::Deflate
- EventMachine::HttpDecoders::GZip
- EventMachine::HttpDecoders::GZipHeader
- EventMachine::HttpEncoding
- EventMachine::HttpRequest
- EventMachine::HttpResponseHeader
- EventMachine::HttpStatus
- EventMachine::HttpStubConnection
- EventMachine::Middleware
- EventMachine::Middleware::DigestAuth
- EventMachine::Middleware::JSONResponse
- EventMachine::Middleware::OAuth
- EventMachine::Middleware::OAuth2
- EventMachine::MultiRequest
- HttpClientOptions
- HttpConnectionOptions
- String

No matching classes.

# EventMachine::HttpClient::CookieJar

### Public Class Methods

new() click to toggle source

    # File lib/em-http/client.rb, line 304
    def initialize
      @jar = ::CookieJar::Jar.new
    end

### Public Instance Methods

get(uri) click to toggle source

    # File lib/em-http/client.rb, line 312
    def get uri
      uri = URI.parse(uri) rescue nil
      uri ? @jar.get_cookies(uri) : []
    end

set(string, uri) click to toggle source

    # File lib/em-http/client.rb, line 308
    def set string, uri
      @jar.set_cookie(uri, string) rescue nil # drop invalid cookies
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.