Class: Coarnotify::Http::HttpResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/coarnotify/http.rb

Overview

Interface for the HTTP response object

This defines the methods which need to be implemented in order for the client to fully operate

Direct Known Subclasses

NetHttpResponse

Instance Method Summary collapse

Instance Method Details

#header(header_name) ⇒ String

Get the value of a header from the response

Parameters:

  • header_name (String)

    the name of the header

Returns:

  • (String)

    the header value

Raises:

  • (NotImplementedError)


49
50
51
# File 'lib/coarnotify/http.rb', line 49

def header(header_name)
  raise NotImplementedError
end

#status_codeInteger

Get the status code of the response

Returns:

  • (Integer)

    the status code

Raises:

  • (NotImplementedError)


56
57
58
# File 'lib/coarnotify/http.rb', line 56

def status_code
  raise NotImplementedError
end