34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# File 'lib/yao/faraday_middlewares.rb', line 34
def on_complete(env)
require 'pp'
body = if env.["content-type"] == "application/json"
JSON.parse(env.body)
else
env.body
end
params = [
env.url.to_s,
body,
env.,
env.,
env.method,
env.status
].map(&:pretty_inspect)
$stdout.puts("================================\n OpenStack response inspection:\n================================\nRequested To: %s\n\nBody:\n%s\nRequest Headers:\n%s\nResponse Headers:\n%s\n\nMethod: %s\nStatus Code: %s\n================================\n\n FMT\nend\n" % params)
|