nxt_http_client 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +5 -5
- data/lib/nxt_http_client/client_dsl.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: fe54eb2ecb7b7c7025699424d538ab43c730dd93728557b427551317e6c60363
|
4
|
+
data.tar.gz: 703d8d45fe804609d39ded9806ecc6c0771a3dba9cb3414df890ffed6589bcca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68dbda40d531999f1f9fde9bfa17726ec6801f6f6d50db4a365dfc4586a1bdae3006d98c792a7f3fa58bc20144484a4044cd0e854b9a30ea4b98059bfb59bc82
|
7
|
+
data.tar.gz: a66fbc5a9aba10fbb4fbcf90d384e6bfd6bb5ca591bb7e8e8507670453167c84bee06390e69223bf6948b4c1251ecc5285db2ef298f121b41d90f5fc7504f40f
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -26,14 +26,14 @@ Or install it yourself as:
|
|
26
26
|
```ruby
|
27
27
|
class MyClient < NxtHttpClient
|
28
28
|
|
29
|
-
|
30
|
-
|
31
|
-
|
29
|
+
configure do |config|
|
30
|
+
config.base_url = 'www.example.com'
|
31
|
+
config.request_options = {
|
32
32
|
headers: { API_KEY: '1993' },
|
33
33
|
method: :get,
|
34
34
|
followlocation: true
|
35
35
|
}
|
36
|
-
|
36
|
+
config.x_request_id_proc = -> { ('a'..'z').to_a.shuffle.take(10).join } # config to -> { SecureRandom.uuid }
|
37
37
|
end
|
38
38
|
|
39
39
|
register_response_handler do |handler|
|
@@ -72,7 +72,7 @@ class MyClient < NxtHttpClient
|
|
72
72
|
end
|
73
73
|
```
|
74
74
|
|
75
|
-
###
|
75
|
+
### configure
|
76
76
|
|
77
77
|
Register default request options on the class level. Available options are `request_options` that are passed directly to
|
78
78
|
the underlying Typhoeus Request. Then there is `base_url` and `x_request_id_proc`.
|