Class: URI::HTTP

Inherits:
Generic
  • Object
show all
Defined in:
lib/ronin/support/network/http/core_ext/uri/http.rb

Instance Method Summary collapse

Instance Method Details

#ok?(**kwargs) ⇒ Boolean

Checks if the HTTP response for the URI has an HTTP OK status code.

Examples:

URI('https://example.com/').ok?
# => true

Parameters:

Returns:

  • (Boolean)

    Specifies whether the response had an HTTP OK status code or not.

See Also:

Since:

  • 0.3.0



66
67
68
# File 'lib/ronin/support/network/http/core_ext/uri/http.rb', line 66

def ok?(**kwargs)
  Ronin::Support::Network::HTTP.ok?(self,**kwargs)
end

#status(**kwargs) ⇒ Integer

Returns the Status Code of the HTTP Response for the URI.

Examples:

URI('http://github.com/').status
# => 301

Parameters:

Returns:

  • (Integer)

    The HTTP Response Status.

See Also:

Since:

  • 0.3.0



44
45
46
# File 'lib/ronin/support/network/http/core_ext/uri/http.rb', line 44

def status(**kwargs)
  Ronin::Support::Network::HTTP.response_status(self,**kwargs)
end