nxt_http_client 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +2 -2
- data/lib/nxt_http_client/client.rb +1 -1
- data/lib/nxt_http_client/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24cb9d0503259603ad4a511e5f015503995a8a888fce15c87dcd6d66c6115ea2
|
4
|
+
data.tar.gz: 2158e2a01d44bad00194de299ecaedeeb29fb76d7c172cbb7b862c92c3f40b81
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b1928da8bacd8f94dab46a279c537fc4195c63940f9424b0366cafe94fd8689cfbea3e718d16ba376653d5ac919a23b967f46449137332bc9578b7ed7fcb465
|
7
|
+
data.tar.gz: 9bd2e240a1cb683fec23bd67392ecda8b96b6e17161b1297350fc00f4b85ea3633bcf151049d01c5bd2906e3495c6b45616afbec5c528b57becd27f2a6e79da9
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -54,12 +54,12 @@ class MyClient < NxtHttpClient
|
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
57
|
-
after_fire do |request, result,
|
57
|
+
after_fire do |request, response, result, error|
|
58
58
|
# Will be called after fire. You probably want to return the result here in order for your code
|
59
59
|
# to be able to access the result from the response handler from before.
|
60
60
|
|
61
61
|
# In case one of the response handler callbacks raises an error
|
62
|
-
# after fire will
|
62
|
+
# after fire will has access to it and you may want to reraise the error in that case.
|
63
63
|
raise result if result.is_a?(StandardError)
|
64
64
|
end
|
65
65
|
|
@@ -67,7 +67,7 @@ module NxtHttpClient
|
|
67
67
|
after_fire_callback = self.class.after_fire_callback
|
68
68
|
|
69
69
|
if after_fire_callback
|
70
|
-
result = instance_exec(request, response,
|
70
|
+
result = instance_exec(request, response, result, error, &after_fire_callback)
|
71
71
|
else
|
72
72
|
result || (raise error)
|
73
73
|
end
|