Class: Gcloud::Logging::Entry::HttpRequest
- Inherits:
-
Object
- Object
- Gcloud::Logging::Entry::HttpRequest
- Defined in:
- lib/gcloud/logging/entry/http_request.rb
Overview
Http Request
HTTP request data associated with a log entry.
Instance Attribute Summary collapse
-
#cache_hit ⇒ Object
Whether or not an entity was served from cache (with or without validation).
-
#method ⇒ Object
The request method.
-
#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.
-
#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 scheme (http, https), the host name, the path and the query portion of the URL that was requested.
-
#user_agent ⇒ Object
The user agent sent by the client.
-
#validated ⇒ Object
Whether or not the response was validated with the origin server before being served from cache.
Instance Attribute Details
#cache_hit ⇒ Object
Whether or not an entity was served from cache (with or without validation).
73 74 75 |
# File 'lib/gcloud/logging/entry/http_request.rb', line 73 def cache_hit @cache_hit end |
#method ⇒ Object
The request method. Examples: "GET", "HEAD", "PUT", "POST".
32 33 34 |
# File 'lib/gcloud/logging/entry/http_request.rb', line 32 def method @method end |
#referer ⇒ Object
The referer URL of the request, as defined in HTTP/1.1 Header Field Definitions.
68 69 70 |
# File 'lib/gcloud/logging/entry/http_request.rb', line 68 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".
63 64 65 |
# File 'lib/gcloud/logging/entry/http_request.rb', line 63 def remote_ip @remote_ip 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.
53 54 55 |
# File 'lib/gcloud/logging/entry/http_request.rb', line 53 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.
43 44 45 |
# File 'lib/gcloud/logging/entry/http_request.rb', line 43 def size @size end |
#status ⇒ Object
The response code indicating the status of response. Examples: 200, 404.
48 49 50 |
# File 'lib/gcloud/logging/entry/http_request.rb', line 48 def status @status end |
#url ⇒ Object
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".
38 39 40 |
# File 'lib/gcloud/logging/entry/http_request.rb', line 38 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)".
58 59 60 |
# File 'lib/gcloud/logging/entry/http_request.rb', line 58 def user_agent @user_agent end |
#validated ⇒ Object
Whether or not the response was validated with the origin server
before being served from cache. This field is only meaningful if
cache_hit is true
.
79 80 81 |
# File 'lib/gcloud/logging/entry/http_request.rb', line 79 def validated @validated end |