Class: Ronin::DB::HTTPRequest

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Model
Defined in:
lib/ronin/db/http_request.rb

Overview

Represents a HTTP request.

Instance Attribute Summary collapse

Method Summary

Methods included from Model

included

Instance Attribute Details

#bodyString?

The optional body of the HTTP request.

Returns:

  • (String, nil)


95
# File 'lib/ronin/db/http_request.rb', line 95

attribute :body, :text

#created_atTime

When the HTTP request was created.

Returns:

  • (Time)


116
# File 'lib/ronin/db/http_request.rb', line 116

attribute :created_at, :datetime

#headersArray<HTTPRequestHeader>

The additional headers of HTTP request.

Returns:



101
102
103
# File 'lib/ronin/db/http_request.rb', line 101

has_many :headers, foreign_key: 'request_id',
class_name:  'HTTPRequestHeader',
dependent:   :destroy

#idInteger

The primary ID for the HTTP request.

Returns:

  • (Integer)


38
# File 'lib/ronin/db/http_request.rb', line 38

attribute :id, :integer

#pathString

The path of the HTTP request.

Returns:

  • (String)


75
# File 'lib/ronin/db/http_request.rb', line 75

attribute :path, :string

#queryString?

The query string of the HTTP request.

Returns:

  • (String, nil)


82
# File 'lib/ronin/db/http_request.rb', line 82

attribute :query, :string

#query_paramsArray<HTTPQueryParam>

The additional parsed query params of the HTTP request.

Returns:



88
89
90
# File 'lib/ronin/db/http_request.rb', line 88

has_many :query_params, foreign_key: 'request_id',
class_name: 'HTTPQueryParam',
dependent:  :destroy

#request_method"copy", ...

The request method.

Returns:

  • ("copy", "delete", "get", "head", "lock", "mkcol", "move", "options", "patch", "post", "propfind", "proppatch", "put", "trace", "unlock")


52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/ronin/db/http_request.rb', line 52

enum request_method: {
  copy:      'COPY',
  delete:    'DELETE',
  get:       'GET',
  head:      'HEAD',
  lock:      'LOCK',
  mkcol:     'MKCOL',
  move:      'MOVE',
  options:   'OPTIONS',
  patch:     'PATCH',
  post:      'POST',
  propfind:  'PROPFIND',
  proppatch: 'PROPPATCH',
  put:       'PUT',
  trace:     'TRACE',
  unlock:    'UNLOCK'
}, _suffix: :request

#responseHTTPResponse?

The optional HTTP response associated with the HTTP request.

Returns:



109
110
# File 'lib/ronin/db/http_request.rb', line 109

belongs_to :response, class_name: 'HTTPResponse',
dependent:  :destroy

#versionString

The HTTP version of the HTTP request.

Returns:

  • (String)


44
# File 'lib/ronin/db/http_request.rb', line 44

attribute :version, :string