2.4.3 (latest) 2.4.2 2.3.1 2.2.2 Reference documentation and code samples for the Google Cloud Platform environment queries class Google::Cloud::Env::ComputeMetadata::Response.

Basic HTTP response object, returned by
[#lookup_response](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-env/latest/Google-Cloud-Env-ComputeMetadata.md.txt#Google__Cloud__Env__ComputeMetadata_lookup_response_instance_ "Google::Cloud::Env::ComputeMetadata#lookup_response (method)").


<br />

This object duck-types the `status`, `body`, and `headers` fields of
`Faraday::Response`. It also includes the CLOCK_MONOTONIC time when
the data was retrieved.

## Inherits

- Object

## Methods

### #body

```ruby
def body() -> String
```
The HTTP response body
**Returns**

- (String)

### #google_flavor?

```ruby
def google_flavor?() -> boolean
```
Returns true if the metadata-flavor is correct for Google Cloud
**Returns**

- (boolean)

### #headers

```ruby
def headers() -> Hash{String=>String}
```
The HTTP response headers
**Returns**

- (Hash{String=\>String})

### #initialize

```ruby
def initialize(status, body, headers) -> Response
```
Create a response object.
**Parameters**

- **status** (Integer) --- The HTTP status, normally 200
- **body** (String) --- The HTTP body as a string
- **headers** (Hash{String=\>String}) --- The HTTP response headers. Normally, the `Metadata-Flavor` header must be set to the value `Google`.
**Returns**

- ([Response](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-env/latest/Google-Cloud-Env-ComputeMetadata-Response.md.txt)) --- a new instance of Response

### #retrieval_monotonic_time

```ruby
def retrieval_monotonic_time() -> Numeric
```
The CLOCK_MONOTONIC time at which this response was retrieved.
**Returns**

- (Numeric)

### #status

```ruby
def status() -> Integer
```
The HTTP status code
**Returns**

- (Integer)