mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Formating fixes
This commit is contained in:
parent
d3c513ed3e
commit
6886d9e89b
1 changed files with 8 additions and 1 deletions
|
@ -135,22 +135,29 @@ response = service.head_containers
|
|||
|
||||
This returns in the following `Excon::Response`:
|
||||
|
||||
```
|
||||
#<Excon::Response:0x10283fc68 @headers={"X-Account-Bytes-Used"=>"2563554", "Date"=>"Thu, 21 Feb 2013 21:57:02 GMT", "X-Account-Meta-Temp-Url-Key"=>"super_secret_key", "X-Timestamp"=>"1354552916.82056", "Content-Length"=>"0", "Content-Type"=>"application/json; charset=utf-8", "X-Trans-Id"=>"txe934924374a744c8a6c40dd8f29ab94a", "Accept-Ranges"=>"bytes", "X-Account-Container-Count"=>"7", "X-Account-Object-Count"=>"5"}, @status=204, @body="">
|
||||
```
|
||||
|
||||
To view the status of the response:
|
||||
|
||||
```ruby
|
||||
response.status
|
||||
```
|
||||
|
||||
**Note**: Fog is aware of the valid HTTP response statuses for each request type. If an unexpected HTTP response status occurs, Fog will raise an exception.
|
||||
|
||||
To view response headers:
|
||||
|
||||
```ruby
|
||||
response.headers
|
||||
```
|
||||
|
||||
This will return:
|
||||
|
||||
```
|
||||
{"X-Account-Bytes-Used"=>"2563554", "Date"=>"Thu, 21 Feb 2013 21:57:02 GMT", "X-Account-Meta-Temp-Url-Key"=>"super_secret_key", "X-Timestamp"=>"1354552916.82056", "Content-Length"=>"0", "Content-Type"=>"application/json; charset=utf-8", "X-Trans-Id"=>"txe934924374a744c8a6c40dd8f29ab94a", "Accept-Ranges"=>"bytes", "X-Account-Container-Count"=>"7", "X-Account-Object-Count"=>"5"}
|
||||
|
||||
```
|
||||
|
||||
To learn more about `Fog::Storage` request methods refer to [rdoc](http://rubydoc.info/gems/fog/Fog/Storage/OpenStack/Real). To learn more about Excon refer to [Excon GitHub repo](https://github.com/geemus/excon).
|
||||
|
||||
|
|
Loading…
Reference in a new issue