Sha256: 56e4532edbd329912cdd16cf26451d92daecdfdf21db00160084686fa7514bcf

Contents?: true

Size: 375 Bytes

Versions: 11

Compression:

Stored size: 375 Bytes

Contents

module Restspec
  module Endpoints
    # A bag for request data.
    class Request < Struct.new(:method, :url, :headers, :payload)
      # Allows to set the endpoint used to generate this request.
      attr_accessor :endpoint

      # @return [String] a json encoded payload
      def raw_payload
        @raw_payload ||= (payload || '').to_json
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
restspec-0.3.2 lib/restspec/endpoints/request.rb
restspec-0.3.1 lib/restspec/endpoints/request.rb
restspec-0.3.0 lib/restspec/endpoints/request.rb
restspec-0.2.6 lib/restspec/endpoints/request.rb
restspec-0.2.5 lib/restspec/endpoints/request.rb
restspec-0.2.4 lib/restspec/endpoints/request.rb
restspec-0.2.3 lib/restspec/endpoints/request.rb
restspec-0.2.2 lib/restspec/endpoints/request.rb
restspec-0.2.1 lib/restspec/endpoints/request.rb
restspec-0.2 lib/restspec/endpoints/request.rb
restspec-0.1 lib/restspec/endpoints/request.rb