Sha256: 59d8de24211ee022bd6a7e72ab45890502c45168d74456a71950c9696176ed92

Contents?: true

Size: 550 Bytes

Versions: 20

Compression:

Stored size: 550 Bytes

Contents

module Capybara::Poltergeist::NetworkTraffic
  class Response
    def initialize(data)
      @data = data
    end

    def url
      @data['url']
    end

    def status
      @data['status']
    end

    def status_text
      @data['statusText']
    end

    def headers
      @data['headers']
    end

    def redirect_url
      @data['redirectURL']
    end

    def body_size
      @data['bodySize']
    end

    def content_type
      @data['contentType']
    end

    def time
      @data['time'] && Time.parse(@data['time'])
    end
  end
end

Version data entries

20 entries across 20 versions & 4 rubygems

Version Path
poltergeist-1.16.0 lib/capybara/poltergeist/network_traffic/response.rb
poltergeist-1.15.0 lib/capybara/poltergeist/network_traffic/response.rb
poltergeist-1.14.0 lib/capybara/poltergeist/network_traffic/response.rb
poltergeist-1.13.0 lib/capybara/poltergeist/network_traffic/response.rb
poltergeist-1.12.0 lib/capybara/poltergeist/network_traffic/response.rb
poltergeistFork-0.0.4 lib/capybara/poltergeist/network_traffic/response.rb
poltergeist-1.11.0 lib/capybara/poltergeist/network_traffic/response.rb
poltergeistFork-0.0.3 lib/capybara/poltergeist/network_traffic/response.rb
poltergeist-1.10.0 lib/capybara/poltergeist/network_traffic/response.rb
poltergeist-1.9.0 lib/capybara/poltergeist/network_traffic/response.rb
poltergeistFork-0.0.2 lib/capybara/poltergeist/network_traffic/response.rb
poltergeistFork-0.0.1 lib/capybara/poltergeist/network_traffic/response.rb
poltergeist-1.8.1 lib/capybara/poltergeist/network_traffic/response.rb
poltergeist-1.8.0 lib/capybara/poltergeist/network_traffic/response.rb
poltergeist-1.7.0 lib/capybara/poltergeist/network_traffic/response.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/poltergeist-1.6.0/lib/capybara/poltergeist/network_traffic/response.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/poltergeist-1.6.0/lib/capybara/poltergeist/network_traffic/response.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/poltergeist-1.6.0/lib/capybara/poltergeist/network_traffic/response.rb
poltergeist-1.6.0 lib/capybara/poltergeist/network_traffic/response.rb
poltergeist-cj-1.5.2 lib/capybara/poltergeist/network_traffic/response.rb