Class: Google::Apis::LoggingV1beta3::HttpRequest
- Inherits:
-
Object
- Object
- Google::Apis::LoggingV1beta3::HttpRequest
- Includes:
- Core::Hashable
- Defined in:
- generated/google/apis/logging_v1beta3/classes.rb,
generated/google/apis/logging_v1beta3/representations.rb,
generated/google/apis/logging_v1beta3/representations.rb
Overview
A common proto for logging HTTP requests.
Instance Attribute Summary collapse
-
#cache_hit ⇒ Boolean
(also: #cache_hit?)
Whether or not an entity was served from cache (with or without validation).
-
#referer ⇒ String
Referer (a.k.a. referrer) URL of request, as defined in http://www.w3.org/ Protocols/rfc2616/rfc2616-sec14.html.
-
#remote_ip ⇒ String
IP address of the client who issues the HTTP request.
-
#request_method ⇒ String
Request method, such as
GET
,HEAD
,PUT
orPOST
. -
#request_size ⇒ String
Size of the HTTP request message in bytes, including request headers and the request body.
-
#request_url ⇒ String
Contains the scheme (http|https), the host name, the path and the query portion of the URL that was requested.
-
#response_size ⇒ String
Size of the HTTP response message in bytes sent back to the client, including response headers and response body.
-
#status ⇒ Fixnum
A response code indicates the status of response, e.g., 200.
-
#user_agent ⇒ String
User agent sent by the client, e.g., "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)".
-
#validated_with_origin_server ⇒ Boolean
(also: #validated_with_origin_server?)
Whether or not the response was validated with the origin server before being served from cache.
Instance Method Summary collapse
-
#initialize(**args) ⇒ HttpRequest
constructor
A new instance of HttpRequest.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ HttpRequest
Returns a new instance of HttpRequest
337 338 339 |
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 337 def initialize(**args) update!(**args) end |
Instance Attribute Details
#cache_hit ⇒ Boolean Also known as: cache_hit?
Whether or not an entity was served from cache (with or without validation).
Corresponds to the JSON property cacheHit
327 328 329 |
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 327 def cache_hit @cache_hit end |
#referer ⇒ String
Referer (a.k.a. referrer) URL of request, as defined in http://www.w3.org/
Protocols/rfc2616/rfc2616-sec14.html.
Corresponds to the JSON property referer
322 323 324 |
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 322 def referer @referer end |
#remote_ip ⇒ String
IP address of the client who issues the HTTP request. Could be either IPv4 or
IPv6.
Corresponds to the JSON property remoteIp
316 317 318 |
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 316 def remote_ip @remote_ip end |
#request_method ⇒ String
Request method, such as GET
, HEAD
, PUT
or POST
.
Corresponds to the JSON property requestMethod
281 282 283 |
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 281 def request_method @request_method end |
#request_size ⇒ String
Size of the HTTP request message in bytes, including request headers and the
request body.
Corresponds to the JSON property requestSize
293 294 295 |
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 293 def request_size @request_size end |
#request_url ⇒ String
Contains the scheme (http|https), the host name, the path and the query
portion of the URL that was requested.
Corresponds to the JSON property requestUrl
287 288 289 |
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 287 def request_url @request_url end |
#response_size ⇒ String
Size of the HTTP response message in bytes sent back to the client, including
response headers and response body.
Corresponds to the JSON property responseSize
304 305 306 |
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 304 def response_size @response_size end |
#status ⇒ Fixnum
A response code indicates the status of response, e.g., 200.
Corresponds to the JSON property status
298 299 300 |
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 298 def status @status end |
#user_agent ⇒ String
User agent sent by the client, e.g., "Mozilla/4.0 (compatible; MSIE 6.0;
Windows 98; Q312461; .NET CLR 1.0.3705)".
Corresponds to the JSON property userAgent
310 311 312 |
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 310 def user_agent @user_agent end |
#validated_with_origin_server ⇒ Boolean Also known as: validated_with_origin_server?
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.
Corresponds to the JSON property validatedWithOriginServer
334 335 336 |
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 334 def validated_with_origin_server @validated_with_origin_server end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
342 343 344 345 346 347 348 349 350 351 352 353 |
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 342 def update!(**args) @request_method = args[:request_method] unless args[:request_method].nil? @request_url = args[:request_url] unless args[:request_url].nil? @request_size = args[:request_size] unless args[:request_size].nil? @status = args[:status] unless args[:status].nil? @response_size = args[:response_size] unless args[:response_size].nil? @user_agent = args[:user_agent] unless args[:user_agent].nil? @remote_ip = args[:remote_ip] unless args[:remote_ip].nil? @referer = args[:referer] unless args[:referer].nil? @cache_hit = args[:cache_hit] unless args[:cache_hit].nil? @validated_with_origin_server = args[:validated_with_origin_server] unless args[:validated_with_origin_server].nil? end |