Class VCR::Request
In: lib/vcr/structs.rb
Parent: Struct.new(:method, :uri, :body, :headers)

The request of an {HTTPInteraction}.

@attr [Symbol] method the HTTP method (i.e. :head, :options, :get, :post, :put, :patch or :delete) @attr [String] uri the request URI @attr [String, nil] body the request body @attr [Hash{String => Array<String>}] headers the request headers

Methods

from_hash   method   new   parsed_uri   to_hash  

Included Modules

Normalizers::Header Normalizers::Body

Classes and Modules

Class VCR::Request::FiberAware
Class VCR::Request::Typed

Public Class methods

Constructs a new instance from a hash.

@param [Hash] hash the hash to use to construct the instance. @return [Request] the request

Public Instance methods

Parses the URI using the configured `uri_parser`.

@return [schema, host, port, path, query] A parsed URI object.

Builds a serializable hash from the request data.

@return [Hash] hash that represents this request and can be easily

 serialized.

@see Request.from_hash

[Validate]