Class: Google::Cloud::Logging::Entry::HttpRequest
- Inherits:
-
Object
- Object
- Google::Cloud::Logging::Entry::HttpRequest
- Defined in:
- lib/google/cloud/logging/entry/http_request.rb
Overview
Instance Attribute Summary collapse
-
#cache_hit ⇒ Object
Whether an entity was served from cache (with or without validation).
-
#referer ⇒ Object
The referer URL of the request, as defined in HTTP/1.1 Header Field Definitions.
-
#remote_ip ⇒ Object
The IP address (IPv4 or IPv6) of the client that issued the HTTP request.
-
#request_method ⇒ Object
The request method.
-
#response_size ⇒ Object
The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body.
-
#size ⇒ Object
The size of the HTTP request message in bytes, including the request headers and the request body.
-
#status ⇒ Object
The response code indicating the status of response.
-
#url ⇒ Object
The URL.
-
#user_agent ⇒ Object
The user agent sent by the client.
-
#validated ⇒ Object
Whether the response was validated with the origin server before being served from cache.
Instance Method Summary collapse
-
#method ⇒ Object
Deprecated.
-
#method ⇒ Object
Deprecated.
Instance Attribute Details
#cache_hit ⇒ Object
Whether an entity was served from cache (with or without validation). (Boolean)
103 104 105 |
# File 'lib/google/cloud/logging/entry/http_request.rb', line 103 def cache_hit @cache_hit end |
#referer ⇒ Object
The referer URL of the request, as defined in HTTP/1.1 Header Field Definitions. (String)
98 99 100 |
# File 'lib/google/cloud/logging/entry/http_request.rb', line 98 def referer @referer end |
#remote_ip ⇒ Object
The IP address (IPv4 or IPv6) of the client that issued the HTTP
request. Examples: "192.168.1.1"
, "FE80::0202:B3FF:FE1E:8329"
.
(String)
92 93 94 |
# File 'lib/google/cloud/logging/entry/http_request.rb', line 92 def remote_ip @remote_ip end |
#request_method ⇒ Object
The request method. Examples: "GET"
, "HEAD"
, "PUT"
, "POST"
.
(String)
35 36 37 |
# File 'lib/google/cloud/logging/entry/http_request.rb', line 35 def request_method @request_method end |
#response_size ⇒ Object
The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body. (Integer)
80 81 82 |
# File 'lib/google/cloud/logging/entry/http_request.rb', line 80 def response_size @response_size end |
#size ⇒ Object
The size of the HTTP request message in bytes, including the request headers and the request body. (Integer)
69 70 71 |
# File 'lib/google/cloud/logging/entry/http_request.rb', line 69 def size @size end |
#status ⇒ Object
The response code indicating the status of response. Examples:
200
, 404
. (Integer)
74 75 76 |
# File 'lib/google/cloud/logging/entry/http_request.rb', line 74 def status @status end |
#url ⇒ Object
The URL. The scheme (http, https), the host name, the path and the
query portion of the URL that was requested. Example:
"http://example.com/some/info?color=red"
. (String)
64 65 66 |
# File 'lib/google/cloud/logging/entry/http_request.rb', line 64 def url @url end |
#user_agent ⇒ Object
The user agent sent by the client. Example: "Mozilla/4.0
(compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)"
.
(String)
86 87 88 |
# File 'lib/google/cloud/logging/entry/http_request.rb', line 86 def user_agent @user_agent end |
#validated ⇒ Object
Whether the response was validated with the origin server before
being served from cache. This field is only meaningful if
cache_hit
is true
. (Boolean)
109 110 111 |
# File 'lib/google/cloud/logging/entry/http_request.rb', line 109 def validated @validated end |
Instance Method Details
#method ⇒ Object
43 44 45 46 47 48 |
# File 'lib/google/cloud/logging/entry/http_request.rb', line 43 def method *args # Call Object#method when args are present. return super unless args.empty? request_method end |
#method ⇒ Object
56 57 58 |
# File 'lib/google/cloud/logging/entry/http_request.rb', line 56 def method= new_request_method self.request_method = new_request_method end |