Sha256: 0d85252d1448e8aa31f6cd47f154edba003073b5c558affd816bfbb4d3da348b

Contents?: true

Size: 665 Bytes

Versions: 17

Compression:

Stored size: 665 Bytes

Contents

# -*- coding: utf-8 -*-
require 'handsoap/http/part'

module Handsoap
  module Http

    # Represents a HTTP Response.
    class Response < Part
      attr_reader :status
      def initialize(status, headers, body, parts = nil)
        @status = status.to_i
        super(headers, body, parts)
      end
      def primary_part
        # Strictly speaking, the main part doesn't need to be first, but until proven otherwise, we'll just assume that.
        if multipart?
          parts.first
        else
          self
        end
      end
      private
      def inspect_head
        "--- Response ---\n" + "HTTP Status: #{status}\n"
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 3 rubygems

Version Path
handsoap-1.4.0 lib/handsoap/http/response.rb
handsoap-1.3.0 lib/handsoap/http/response.rb
handsoap-1.2.2 lib/handsoap/http/response.rb
handsoap-1.1.8 lib/handsoap/http/response.rb
handsoap-1.1.7 lib/handsoap/http/response.rb
pgericson-handsoap-1.1.10 lib/handsoap/http/response.rb
pgericson-handsoap-1.1.9 lib/handsoap/http/response.rb
pgericson-handsoap-1.1.8 lib/handsoap/http/response.rb
pgericson-handsoap-1.1.7 lib/handsoap/http/response.rb
handsoap-1.1.6 lib/handsoap/http/response.rb
handsoap-1.1.5 lib/handsoap/http/response.rb
whenyouneedme-handsoap-1.1.4 lib/handsoap/http/response.rb
handsoap-1.1.4 lib/handsoap/http/response.rb
handsoap-1.1.3 lib/handsoap/http/response.rb
handsoap-1.1.2 lib/handsoap/http/response.rb
handsoap-1.1.1 lib/handsoap/http/response.rb
handsoap-1.1.0 lib/handsoap/http/response.rb