hawkular-client 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/.coveralls.yml +1 -0
  3. data/.gitignore +2 -1
  4. data/.rubocop.yml +19 -6
  5. data/CHANGES.rdoc +13 -3
  6. data/README.rdoc +9 -3
  7. data/hawkularclient.gemspec +8 -4
  8. data/lib/alerts/alerts_api.rb +202 -32
  9. data/lib/hawkular.rb +35 -67
  10. data/lib/hawkular_all.rb +2 -0
  11. data/lib/inventory/inventory_api.rb +459 -130
  12. data/lib/metrics/metric_api.rb +14 -9
  13. data/lib/operations/operations_api.rb +247 -0
  14. data/lib/tokens/tokens_api.rb +33 -0
  15. data/lib/version.rb +1 -1
  16. data/spec/integration/alerts_spec.rb +272 -20
  17. data/spec/integration/hello-world-definitions.json +46 -0
  18. data/spec/integration/inventory_spec.rb +253 -89
  19. data/spec/integration/metric_spec.rb +36 -0
  20. data/spec/integration/operations_spec.rb +420 -0
  21. data/spec/integration/tokens_spec.rb +45 -0
  22. data/spec/resources/driver.jar +0 -0
  23. data/spec/resources/sample.war +0 -0
  24. data/spec/spec_helper.rb +30 -6
  25. data/spec/unit/base_spec.rb +22 -1
  26. data/spec/unit/canonical_path_spec.rb +92 -0
  27. data/spec/vcr/vcr_setup.rb +3 -4
  28. data/spec/vcr_cassettes/Alert/EndToEnd/Should_create_and_fire_a_trigger.yml +1187 -0
  29. data/spec/vcr_cassettes/Alert/Events/Should_list_events.yml +101 -0
  30. data/spec/vcr_cassettes/Alert/Events/Should_list_events_using_criteria.yml +79 -0
  31. data/spec/vcr_cassettes/Alert/Events/Should_not_list_events_using_criteria.yml +49 -0
  32. data/spec/vcr_cassettes/Alert/Triggers/Should_bulk_load_triggers.yml +225 -0
  33. data/spec/vcr_cassettes/Alert/Triggers/Should_create_a_basic_trigger_with_action.yml +355 -0
  34. data/spec/vcr_cassettes/Alert/Triggers/Should_create_an_action.yml +134 -0
  35. data/spec/vcr_cassettes/Alert/Triggers/Should_create_an_action_for_webhooks.yml +220 -0
  36. data/spec/vcr_cassettes/Alert/Triggers/Should_get_the_action_definitions.yml +218 -0
  37. data/spec/vcr_cassettes/Alert/Triggers/Should_not_create_an_action_for_unknown_plugin.yml +46 -0
  38. data/spec/vcr_cassettes/Alert/Triggers/Should_not_create_an_action_for_unknown_properties.yml +134 -0
  39. data/spec/vcr_cassettes/Counter_metrics/Should_get_metrics_with_limit_and_order.yml +270 -0
  40. data/spec/vcr_cassettes/Inventory/Client_should_listen_on_various_inventory_events.json +47 -0
  41. data/spec/vcr_cassettes/Inventory/Client_should_listen_on_various_inventory_events.yml +191 -0
  42. data/spec/vcr_cassettes/Inventory/Helpers/generate_some_events_for_websocket.yml +507 -0
  43. data/spec/vcr_cassettes/Inventory/Should_List_datasources_with_no_props.yml +74 -69
  44. data/spec/vcr_cassettes/Inventory/{Should_list_types_without_feed.yml → Should_create_a_feed.yml} +29 -32
  45. data/spec/vcr_cassettes/Inventory/Should_create_a_feed_again.yml +211 -0
  46. data/spec/vcr_cassettes/Inventory/Should_create_a_resource_.yml +355 -0
  47. data/spec/vcr_cassettes/Inventory/Should_create_a_resource_with_metric.yml +786 -0
  48. data/spec/vcr_cassettes/Inventory/Should_create_a_resourcetype.yml +205 -0
  49. data/spec/vcr_cassettes/Inventory/Should_create_and_delete_feed.yml +201 -0
  50. data/spec/vcr_cassettes/Inventory/Should_create_and_get_a_resource.yml +419 -0
  51. data/spec/vcr_cassettes/Inventory/Should_list_URLs.yml +39 -27
  52. data/spec/vcr_cassettes/Inventory/Should_list_WildFlys.yml +37 -29
  53. data/spec/vcr_cassettes/Inventory/Should_list_WildFlys_with_props.yml +53 -45
  54. data/spec/vcr_cassettes/Inventory/Should_list_all_the_resource_types.yml +177 -0
  55. data/spec/vcr_cassettes/Inventory/Should_list_children_of_WildFly.yml +230 -56
  56. data/spec/vcr_cassettes/Inventory/Should_list_feeds.yml +27 -24
  57. data/spec/vcr_cassettes/Inventory/Should_list_heap_metrics_for_WildFlys.yml +586 -119
  58. data/spec/vcr_cassettes/Inventory/Should_list_metrics_for_WildFlys.yml +220 -59
  59. data/spec/vcr_cassettes/Inventory/Should_list_metrics_of_given_metric_type.yml +613 -0
  60. data/spec/vcr_cassettes/Inventory/Should_list_metrics_of_given_resource_type.yml +333 -0
  61. data/spec/vcr_cassettes/Inventory/Should_list_recursive_children_of_WildFly.yml +2064 -0
  62. data/spec/vcr_cassettes/Inventory/Should_list_relationships_of_WildFly.yml +460 -0
  63. data/spec/vcr_cassettes/Inventory/Should_list_types_with_bad_feed.yml +26 -25
  64. data/spec/vcr_cassettes/Inventory/Should_list_types_with_feed.yml +102 -36
  65. data/spec/vcr_cassettes/Inventory/Should_not_find_an_unknown_resource.yml +54 -0
  66. data/spec/vcr_cassettes/Inventory/Tenants/Should_Get_Tenant_For_Explicit_Credentials.yml +50 -0
  67. data/spec/vcr_cassettes/Inventory/Tenants/Should_Get_Tenant_For_Implicit_Credentials.yml +50 -0
  68. data/spec/vcr_cassettes/Operation/Helpers/get_tenant.yml +50 -0
  69. data/spec/vcr_cassettes/Operation/Operation/Add_JDBC_driver_should_add_the_driver.json +26 -0
  70. data/spec/vcr_cassettes/Operation/Operation/Add_datasource_should_be_doable.json +26 -0
  71. data/spec/vcr_cassettes/Operation/Operation/Add_deployment_should_be_doable.json +26 -0
  72. data/spec/vcr_cassettes/Operation/Operation/Redeploy_can_be_run_multiple_times_in_parallel.json +40 -0
  73. data/spec/vcr_cassettes/Operation/Operation/Redeploy_should_be_performed_and_eventually_respond_with_success.json +26 -0
  74. data/spec/vcr_cassettes/Operation/Operation/Redeploy_should_not_be_performed_if_resource_path_is_wrong.json +26 -0
  75. data/spec/vcr_cassettes/Operation/Operation/Remove_JDBC_driver_should_be_performed_and_eventually_respond_with_success.json +26 -0
  76. data/spec/vcr_cassettes/Operation/Operation/Remove_datasource_should_be_performed_and_eventually_respond_with_success.json +26 -0
  77. data/spec/vcr_cassettes/Operation/Operation/Remove_deployment_should_be_performed_and_eventually_respond_with_success.json +26 -0
  78. data/spec/vcr_cassettes/Operation/Operation/Undeploy_should_be_performed_and_eventually_respond_with_success.json +26 -0
  79. data/spec/vcr_cassettes/Operation/Operation/should_not_be_possible_to_perform_on_closed_client.json +12 -0
  80. data/spec/vcr_cassettes/Operation/Websocket_connection/should_be_established.json +9 -0
  81. data/spec/vcr_cassettes/Tokens/Should_be_able_to_create_a_new_token_for_an_actual_user.yml +57 -0
  82. data/spec/vcr_cassettes/Tokens/Should_be_able_to_list_the_available_tokens.yml +49 -0
  83. data/spec/vcr_cassettes/Tokens/Should_get_a_401_when_attempting_to_create_a_token_with_a_wrong_password.yml +56 -0
  84. data/spec/vcr_cassettes/Tokens/Should_get_a_401_when_attempting_to_create_a_token_without_a_password.yml +55 -0
  85. metadata +175 -11
  86. data/lib/metrics/version.rb +0 -7
@@ -0,0 +1,101 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://jdoe:password@localhost:8080/hawkular/alerts/events?thin=true
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ Content-Type:
15
+ - application/json
16
+ User-Agent:
17
+ - Ruby
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Content-Encoding:
24
+ - gzip
25
+ Expires:
26
+ - '0'
27
+ Cache-Control:
28
+ - no-cache, no-store, must-revalidate
29
+ X-Powered-By:
30
+ - Undertow/1
31
+ Server:
32
+ - WildFly/10
33
+ Pragma:
34
+ - no-cache
35
+ Date:
36
+ - Thu, 03 Mar 2016 20:57:01 GMT
37
+ X-Total-Count:
38
+ - '12'
39
+ Connection:
40
+ - keep-alive
41
+ Content-Type:
42
+ - application/json
43
+ Content-Length:
44
+ - '2138'
45
+ Link:
46
+ - <http://localhost:8080/hawkular/alerts/events?thin=true>; rel="current", <http://localhost:8080/hawkular/alerts/events?thin=true&page=0>;
47
+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@@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://jdoe:password@localhost:8080/hawkular/alerts/events?endTime=1457025122000&startTime=1457017922000
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ Content-Type:
15
+ - application/json
16
+ User-Agent:
17
+ - Ruby
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Content-Encoding:
24
+ - gzip
25
+ Expires:
26
+ - '0'
27
+ Cache-Control:
28
+ - no-cache, no-store, must-revalidate
29
+ X-Powered-By:
30
+ - Undertow/1
31
+ Server:
32
+ - WildFly/10
33
+ Pragma:
34
+ - no-cache
35
+ Date:
36
+ - Thu, 03 Mar 2016 17:12:02 GMT
37
+ X-Total-Count:
38
+ - '1'
39
+ Connection:
40
+ - keep-alive
41
+ Content-Type:
42
+ - application/json
43
+ Content-Length:
44
+ - '1096'
45
+ Link:
46
+ - <http://localhost:8080/hawkular/alerts/events?startTime=1457017922000&endTime=1457025122000>;
47
+ rel="current", <http://localhost:8080/hawkular/alerts/events?startTime=1457017922000&endTime=1457025122000&page=0>;
48
+ rel="last"
49
+ body:
50
+ encoding: ASCII-8BIT
51
+ string: !binary |-
52
+ H4sIAAAAAAAAAO2ZX0/jOBDAv0rVZ1Kc2LGd5al0u2xPlEVtb++hqpCbuBBd
53
+ mlSOg5ZD7We/cf4dYVMEHLe6hyBByYzHnhn/xh7C8rEv72WsFw872f/UH16O
54
+ Z4v+SV/LWMR6EoDI4ciha0wtvpHEIhg7Fic+t1yHSJthQfl6AxahGfvb9+nN
55
+ xejG9+012ZCNtfGQZxEqAksQyqy1zwKJsS0oRaeXiS8iyyYuQ7bnUs48bjki
56
+ cGkQICvwSGARRMGQ+cTy1oEnCQ+48Newlq/DLXjbsD3pB0KLeZIp3wRyEyex
57
+ vOkX0sm7fDMLCS1vE/XQyMwPbR59P9tmEeiD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FGV77xE8
74
+ IC63GUOMEeq+zD10OZwd5Z4CBbzjvuP+o7hniPJ27quCeP6/ihzAVu6roqja
75
+ e2NPmEeZy4jn2c5+tXr6krd86auFzlLw9Nv1+Ap8Ff6fxaQo//28HqiK145B
76
+ ra0E1ZD96m+PwUj3DRoAAA==
77
+ http_version:
78
+ recorded_at: Thu, 03 Mar 2016 17:12:02 GMT
79
+ recorded_with: VCR 3.0.1
@@ -0,0 +1,49 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://jdoe:password@localhost:8080/hawkular/alerts/events?endTime=1000&startTime=0
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ Content-Type:
15
+ - application/json
16
+ User-Agent:
17
+ - Ruby
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Content-Encoding:
24
+ - gzip
25
+ Expires:
26
+ - '0'
27
+ Cache-Control:
28
+ - no-cache, no-store, must-revalidate
29
+ X-Powered-By:
30
+ - Undertow/1
31
+ Server:
32
+ - WildFly/10
33
+ Pragma:
34
+ - no-cache
35
+ Date:
36
+ - Thu, 03 Mar 2016 17:12:02 GMT
37
+ Connection:
38
+ - keep-alive
39
+ Content-Type:
40
+ - application/json
41
+ Content-Length:
42
+ - '22'
43
+ body:
44
+ encoding: ASCII-8BIT
45
+ string: !binary |-
46
+ H4sIAAAAAAAAAIuOBQApu0wNAgAAAA==
47
+ http_version:
48
+ recorded_at: Thu, 03 Mar 2016 17:12:02 GMT
49
+ recorded_with: VCR 3.0.1
@@ -0,0 +1,225 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://jdoe:password@localhost:8080/hawkular/alerts/import/all
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"triggers":[{"trigger":{"id":"hello-world-trigger","name":"Hello World
9
+ Trigger","description":"A mandatory Hello World Trigger","severity":"HIGH","enabled":true,"actions":[{"actionPlugin":"email","actionId":"notify-to-admins"}]},"conditions":[{"triggerMode":"FIRING","type":"threshold","dataId":"data-x","operator":"LT","threshold":5},{"triggerMode":"FIRING","type":"threshold","dataId":"data-y","operator":"GT","threshold":5}]}],"actions":[{"actionPlugin":"email","actionId":"notify-to-admins","properties":{"to":"admins@hawkular.org","cc":"developers@hawkular.org","description":"Notify
10
+ by email to Admins with cc to Developers"}}]}'
11
+ headers:
12
+ Accept:
13
+ - application/json
14
+ Accept-Encoding:
15
+ - gzip, deflate
16
+ Content-Type:
17
+ - application/json
18
+ Content-Length:
19
+ - '635'
20
+ User-Agent:
21
+ - Ruby
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Expires:
28
+ - '0'
29
+ Cache-Control:
30
+ - no-cache, no-store, must-revalidate
31
+ X-Powered-By:
32
+ - Undertow/1
33
+ Server:
34
+ - WildFly/10
35
+ Pragma:
36
+ - no-cache
37
+ Date:
38
+ - Mon, 14 Mar 2016 10:36:20 GMT
39
+ Connection:
40
+ - keep-alive
41
+ Content-Type:
42
+ - application/json
43
+ Content-Length:
44
+ - '1434'
45
+ body:
46
+ encoding: ASCII-8BIT
47
+ string: '{"triggers":[{"trigger":{"tenantId":"28026b36-8fe4-4332-84c8-524e173a68bf","id":"hello-world-trigger","name":"Hello
48
+ World Trigger","description":"A mandatory Hello World Trigger","type":"STANDARD","eventType":"ALERT","eventCategory":null,"eventText":null,"severity":"HIGH","actions":[{"tenantId":"28026b36-8fe4-4332-84c8-524e173a68bf","actionPlugin":"email","actionId":"notify-to-admins"}],"autoDisable":false,"autoEnable":false,"autoResolve":false,"autoResolveAlerts":true,"autoResolveMatch":"ALL","enabled":true,"firingMatch":"ALL","source":"_none_"},"conditions":[{"tenantId":"28026b36-8fe4-4332-84c8-524e173a68bf","triggerId":"hello-world-trigger","triggerMode":"FIRING","type":"THRESHOLD","conditionSetSize":1,"conditionSetIndex":1,"conditionId":"28026b36-8fe4-4332-84c8-524e173a68bf-hello-world-trigger-FIRING-1-1","dataId":"data-x","operator":"LT","threshold":5.0},{"tenantId":"28026b36-8fe4-4332-84c8-524e173a68bf","triggerId":"hello-world-trigger","triggerMode":"FIRING","type":"THRESHOLD","conditionSetSize":2,"conditionSetIndex":2,"conditionId":"28026b36-8fe4-4332-84c8-524e173a68bf-hello-world-trigger-FIRING-2-2","dataId":"data-y","operator":"GT","threshold":5.0}]}],"actions":[{"tenantId":"28026b36-8fe4-4332-84c8-524e173a68bf","actionPlugin":"email","actionId":"notify-to-admins","properties":{"to":"admins@hawkular.org","cc":"developers@hawkular.org","description":"Notify
49
+ by email to Admins with cc to Developers"}}]}'
50
+ http_version:
51
+ recorded_at: Mon, 14 Mar 2016 10:36:20 GMT
52
+ - request:
53
+ method: get
54
+ uri: http://jdoe:password@localhost:8080/hawkular/alerts/triggers/hello-world-trigger
55
+ body:
56
+ encoding: US-ASCII
57
+ string: ''
58
+ headers:
59
+ Accept:
60
+ - application/json
61
+ Accept-Encoding:
62
+ - gzip, deflate
63
+ Content-Type:
64
+ - application/json
65
+ User-Agent:
66
+ - Ruby
67
+ response:
68
+ status:
69
+ code: 200
70
+ message: OK
71
+ headers:
72
+ Expires:
73
+ - '0'
74
+ Cache-Control:
75
+ - no-cache, no-store, must-revalidate
76
+ X-Powered-By:
77
+ - Undertow/1
78
+ Server:
79
+ - WildFly/10
80
+ Pragma:
81
+ - no-cache
82
+ Date:
83
+ - Mon, 14 Mar 2016 10:36:20 GMT
84
+ Connection:
85
+ - keep-alive
86
+ Content-Type:
87
+ - application/json
88
+ Content-Length:
89
+ - '528'
90
+ body:
91
+ encoding: ASCII-8BIT
92
+ string: '{"tenantId":"28026b36-8fe4-4332-84c8-524e173a68bf","id":"hello-world-trigger","name":"Hello
93
+ World Trigger","description":"A mandatory Hello World Trigger","type":"STANDARD","eventType":"ALERT","eventCategory":null,"eventText":null,"severity":"HIGH","actions":[{"tenantId":"28026b36-8fe4-4332-84c8-524e173a68bf","actionPlugin":"email","actionId":"notify-to-admins"}],"autoDisable":false,"autoEnable":false,"autoResolve":false,"autoResolveAlerts":true,"autoResolveMatch":"ALL","enabled":true,"firingMatch":"ALL","source":"_none_"}'
94
+ http_version:
95
+ recorded_at: Mon, 14 Mar 2016 10:36:20 GMT
96
+ - request:
97
+ method: get
98
+ uri: http://jdoe:password@localhost:8080/hawkular/alerts/triggers/hello-world-trigger/conditions
99
+ body:
100
+ encoding: US-ASCII
101
+ string: ''
102
+ headers:
103
+ Accept:
104
+ - application/json
105
+ Accept-Encoding:
106
+ - gzip, deflate
107
+ Content-Type:
108
+ - application/json
109
+ User-Agent:
110
+ - Ruby
111
+ response:
112
+ status:
113
+ code: 200
114
+ message: OK
115
+ headers:
116
+ Expires:
117
+ - '0'
118
+ Cache-Control:
119
+ - no-cache, no-store, must-revalidate
120
+ X-Powered-By:
121
+ - Undertow/1
122
+ Server:
123
+ - WildFly/10
124
+ Pragma:
125
+ - no-cache
126
+ Date:
127
+ - Mon, 14 Mar 2016 10:36:20 GMT
128
+ Connection:
129
+ - keep-alive
130
+ Content-Type:
131
+ - application/json
132
+ Content-Length:
133
+ - '611'
134
+ body:
135
+ encoding: ASCII-8BIT
136
+ string: '[{"tenantId":"28026b36-8fe4-4332-84c8-524e173a68bf","triggerId":"hello-world-trigger","triggerMode":"FIRING","type":"THRESHOLD","conditionSetSize":2,"conditionSetIndex":1,"conditionId":"28026b36-8fe4-4332-84c8-524e173a68bf-hello-world-trigger-FIRING-2-1","dataId":"data-x","operator":"LT","threshold":5.0},{"tenantId":"28026b36-8fe4-4332-84c8-524e173a68bf","triggerId":"hello-world-trigger","triggerMode":"FIRING","type":"THRESHOLD","conditionSetSize":2,"conditionSetIndex":2,"conditionId":"28026b36-8fe4-4332-84c8-524e173a68bf-hello-world-trigger-FIRING-2-2","dataId":"data-y","operator":"GT","threshold":5.0}]'
137
+ http_version:
138
+ recorded_at: Mon, 14 Mar 2016 10:36:20 GMT
139
+ - request:
140
+ method: get
141
+ uri: http://jdoe:password@localhost:8080/hawkular/alerts/triggers/hello-world-trigger/dampenings
142
+ body:
143
+ encoding: US-ASCII
144
+ string: ''
145
+ headers:
146
+ Accept:
147
+ - application/json
148
+ Accept-Encoding:
149
+ - gzip, deflate
150
+ Content-Type:
151
+ - application/json
152
+ User-Agent:
153
+ - Ruby
154
+ response:
155
+ status:
156
+ code: 200
157
+ message: OK
158
+ headers:
159
+ Expires:
160
+ - '0'
161
+ Cache-Control:
162
+ - no-cache, no-store, must-revalidate
163
+ X-Powered-By:
164
+ - Undertow/1
165
+ Server:
166
+ - WildFly/10
167
+ Pragma:
168
+ - no-cache
169
+ Date:
170
+ - Mon, 14 Mar 2016 10:36:20 GMT
171
+ Connection:
172
+ - keep-alive
173
+ Content-Type:
174
+ - application/json
175
+ Content-Length:
176
+ - '2'
177
+ body:
178
+ encoding: ASCII-8BIT
179
+ string: '[]'
180
+ http_version:
181
+ recorded_at: Mon, 14 Mar 2016 10:36:20 GMT
182
+ - request:
183
+ method: delete
184
+ uri: http://jdoe:password@localhost:8080/hawkular/alerts/triggers/hello-world-trigger
185
+ body:
186
+ encoding: US-ASCII
187
+ string: ''
188
+ headers:
189
+ Accept:
190
+ - application/json
191
+ Accept-Encoding:
192
+ - gzip, deflate
193
+ Content-Type:
194
+ - application/json
195
+ User-Agent:
196
+ - Ruby
197
+ response:
198
+ status:
199
+ code: 200
200
+ message: OK
201
+ headers:
202
+ Expires:
203
+ - '0'
204
+ Cache-Control:
205
+ - no-cache, no-store, must-revalidate
206
+ X-Powered-By:
207
+ - Undertow/1
208
+ Server:
209
+ - WildFly/10
210
+ Pragma:
211
+ - no-cache
212
+ Date:
213
+ - Mon, 14 Mar 2016 10:36:20 GMT
214
+ Connection:
215
+ - keep-alive
216
+ Content-Type:
217
+ - application/json
218
+ Content-Length:
219
+ - '0'
220
+ body:
221
+ encoding: UTF-8
222
+ string: ''
223
+ http_version:
224
+ recorded_at: Mon, 14 Mar 2016 10:36:20 GMT
225
+ recorded_with: VCR 3.0.0