Method: HTTPClient::Session#get_header

Defined in:
lib/httpclient/session.rb

#get_headerObject



556
557
558
559
560
561
562
563
564
565
566
567
# File 'lib/httpclient/session.rb', line 556

def get_header
  begin
    if @state != :META
      raise RuntimeError.new("get_status must be called at the beginning of a session")
    end
    read_header
  rescue
    close
    raise
  end
  [@version, @status, @reason, @headers]
end