class WebkitRemote::Client::NetworkRequest

Wraps information about HTTP requests.

Attributes

body[R]

@return [String] the body of a POST request

headers[R]

@return [Hash<String, String>] the HTTP headers of the request

method[R]

@return [Symbol, nil] HTTP request method, e.g. :get

url[R]

@return [String] the URL of the request

Public Class Methods

new(raw_response) click to toggle source

@private use Event#for instead of calling this constructor directly

@param [Hash<String, Number>] the raw RPC data for a Response object

in the Network domain
# File lib/webkit_remote/client/network_events.rb, line 362
def initialize(raw_response)
  @headers = raw_response['headers'] || {}
  @method = raw_response['method'] ? raw_response['method'].downcase.to_sym :
            nil
  @body = raw_response['postData']
  @url = raw_response['url']
end