Sha256: d4a8201550de983b399294b308fbbb80e3e26c73407c5a7115ce4183590547e2

Contents?: true

Size: 581 Bytes

Versions: 5

Compression:

Stored size: 581 Bytes

Contents

# frozen_string_literal: true

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

5 entries across 4 versions & 2 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.1.0/gems/poltergeist-1.18.1/lib/capybara/poltergeist/network_traffic/response.rb
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/poltergeist-1.18.1/lib/capybara/poltergeist/network_traffic/response.rb
poltergeist-1.18.1 lib/capybara/poltergeist/network_traffic/response.rb
poltergeist-1.18.0 lib/capybara/poltergeist/network_traffic/response.rb
poltergeist-1.17.0 lib/capybara/poltergeist/network_traffic/response.rb