restify 2.0.1 → 2.0.2
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/CHANGELOG.md +8 -0
- data/lib/restify/relation.rb +6 -2
- data/lib/restify/version.rb +1 -1
- data/spec/restify/relation_spec.rb +54 -1
- data/vendor/bundle/ruby/3.4.0/bundler/gems/my-rubocop-3bcd2110ca87/LICENSE +21 -0
- data/vendor/bundle/ruby/3.4.0/bundler/gems/my-rubocop-3bcd2110ca87/README.md +23 -0
- data/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.2/CHANGELOG.md +255 -0
- data/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.2/MIT-LICENSE +20 -0
- data/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.2/README.rdoc +40 -0
- data/vendor/bundle/ruby/3.4.0/gems/addressable-2.8.7/CHANGELOG.md +301 -0
- data/vendor/bundle/ruby/3.4.0/gems/addressable-2.8.7/LICENSE.txt +202 -0
- data/vendor/bundle/ruby/3.4.0/gems/addressable-2.8.7/README.md +121 -0
- data/vendor/bundle/ruby/3.4.0/gems/base64-0.2.0/LICENSE.txt +22 -0
- data/vendor/bundle/ruby/3.4.0/gems/base64-0.2.0/README.md +48 -0
- data/vendor/bundle/ruby/3.4.0/gems/benchmark-0.4.0/README.md +138 -0
- data/vendor/bundle/ruby/3.4.0/gems/bigdecimal-3.1.9/LICENSE +56 -0
- data/vendor/bundle/ruby/3.4.0/gems/concurrent-ruby-1.3.5/CHANGELOG.md +603 -0
- data/vendor/bundle/ruby/3.4.0/gems/concurrent-ruby-1.3.5/LICENSE.txt +21 -0
- data/vendor/bundle/ruby/3.4.0/gems/concurrent-ruby-1.3.5/README.md +407 -0
- data/vendor/bundle/ruby/3.4.0/gems/connection_pool-2.5.3/LICENSE +20 -0
- data/vendor/bundle/ruby/3.4.0/gems/connection_pool-2.5.3/README.md +167 -0
- data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.1/LICENSE.txt +22 -0
- data/vendor/bundle/ruby/3.4.0/gems/ethon-0.16.0/CHANGELOG.md +375 -0
- data/vendor/bundle/ruby/3.4.0/gems/ethon-0.16.0/LICENSE +20 -0
- data/vendor/bundle/ruby/3.4.0/gems/ethon-0.16.0/README.md +118 -0
- data/vendor/bundle/ruby/3.4.0/gems/ffi-1.17.2-x86_64-linux-gnu/CHANGELOG.md +473 -0
- data/vendor/bundle/ruby/3.4.0/gems/ffi-1.17.2-x86_64-linux-gnu/LICENSE +24 -0
- data/vendor/bundle/ruby/3.4.0/gems/ffi-1.17.2-x86_64-linux-gnu/LICENSE.SPECS +22 -0
- data/vendor/bundle/ruby/3.4.0/gems/ffi-1.17.2-x86_64-linux-gnu/README.md +137 -0
- data/vendor/bundle/ruby/3.4.0/gems/hitimes-3.1.0/LICENSE.txt +16 -0
- data/vendor/bundle/ruby/3.4.0/gems/hitimes-3.1.0/README.md +187 -0
- data/vendor/bundle/ruby/3.4.0/gems/i18n-1.14.7/MIT-LICENSE +20 -0
- data/vendor/bundle/ruby/3.4.0/gems/i18n-1.14.7/README.md +127 -0
- data/vendor/bundle/ruby/3.4.0/gems/little-plugger-1.1.4/README.rdoc +53 -0
- data/vendor/bundle/ruby/3.4.0/gems/logger-1.7.0/README.md +104 -0
- data/vendor/bundle/ruby/3.4.0/gems/logging-2.4.0/LICENSE +22 -0
- data/vendor/bundle/ruby/3.4.0/gems/logging-2.4.0/README.md +140 -0
- data/vendor/bundle/ruby/3.4.0/gems/minitest-5.25.5/README.rdoc +842 -0
- data/vendor/bundle/ruby/3.4.0/gems/msgpack-1.8.0/ChangeLog +368 -0
- data/vendor/bundle/ruby/3.4.0/gems/msgpack-1.8.0/LICENSE +177 -0
- data/vendor/bundle/ruby/3.4.0/gems/msgpack-1.8.0/README.md +302 -0
- data/vendor/bundle/ruby/3.4.0/gems/multi_json-1.15.0/CHANGELOG.md +275 -0
- data/vendor/bundle/ruby/3.4.0/gems/multi_json-1.15.0/LICENSE.md +20 -0
- data/vendor/bundle/ruby/3.4.0/gems/multi_json-1.15.0/README.md +121 -0
- data/vendor/bundle/ruby/3.4.0/gems/opentelemetry-api-1.5.0/CHANGELOG.md +193 -0
- data/vendor/bundle/ruby/3.4.0/gems/opentelemetry-api-1.5.0/LICENSE +201 -0
- data/vendor/bundle/ruby/3.4.0/gems/opentelemetry-api-1.5.0/README.md +68 -0
- data/vendor/bundle/ruby/3.4.0/gems/opentelemetry-common-0.22.0/CHANGELOG.md +98 -0
- data/vendor/bundle/ruby/3.4.0/gems/opentelemetry-common-0.22.0/LICENSE +201 -0
- data/vendor/bundle/ruby/3.4.0/gems/opentelemetry-common-0.22.0/README.md +62 -0
- data/vendor/bundle/ruby/3.4.0/gems/public_suffix-6.0.2/CHANGELOG.md +498 -0
- data/vendor/bundle/ruby/3.4.0/gems/public_suffix-6.0.2/LICENSE.txt +22 -0
- data/vendor/bundle/ruby/3.4.0/gems/public_suffix-6.0.2/README.md +222 -0
- data/vendor/bundle/ruby/3.4.0/gems/rack-3.1.15/CHANGELOG.md +1146 -0
- data/vendor/bundle/ruby/3.4.0/gems/rack-3.1.15/MIT-LICENSE +20 -0
- data/vendor/bundle/ruby/3.4.0/gems/rack-3.1.15/README.md +355 -0
- data/vendor/bundle/ruby/3.4.0/gems/rake-13.2.1/MIT-LICENSE +21 -0
- data/vendor/bundle/ruby/3.4.0/gems/rake-13.2.1/README.rdoc +155 -0
- data/vendor/bundle/ruby/3.4.0/gems/rake-release-1.3.0/LICENSE +21 -0
- data/vendor/bundle/ruby/3.4.0/gems/rake-release-1.3.0/README.md +107 -0
- data/vendor/bundle/ruby/3.4.0/gems/securerandom-0.4.1/README.md +72 -0
- data/vendor/bundle/ruby/3.4.0/gems/typhoeus-1.4.1/CHANGELOG.md +410 -0
- data/vendor/bundle/ruby/3.4.0/gems/typhoeus-1.4.1/LICENSE +22 -0
- data/vendor/bundle/ruby/3.4.0/gems/typhoeus-1.4.1/README.md +588 -0
- data/vendor/bundle/ruby/3.4.0/gems/tzinfo-2.0.6/LICENSE +19 -0
- data/vendor/bundle/ruby/3.4.0/gems/tzinfo-2.0.6/README.md +406 -0
- data/vendor/bundle/ruby/3.4.0/gems/uri-1.0.3/README.md +55 -0
- metadata +66 -4
- data/doc/file.README.html +0 -192
@@ -0,0 +1,375 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## Master
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.15.0...master)
|
6
|
+
|
7
|
+
* Added `redirect_url` value to available informations and `Easy::Mirror`.
|
8
|
+
([Adrien Rey-Jarthon](https://github.com/jarthod)
|
9
|
+
|
10
|
+
## 0.15.0
|
11
|
+
|
12
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.14.0...v0.15.0)
|
13
|
+
|
14
|
+
## 0.12.0
|
15
|
+
|
16
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.11.0...v0.12.0)
|
17
|
+
|
18
|
+
- Removed deprecated `CURLE_SSL_CACERT` pinned in curl v7.62.0 ([@arku](https://github.com/arku) in [#158](https://github.com/typhoeus/ethon/pull/158))
|
19
|
+
|
20
|
+
|
21
|
+
## 0.11.0
|
22
|
+
|
23
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.10.1...v0.11.0)
|
24
|
+
|
25
|
+
## 0.10.1
|
26
|
+
|
27
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.10.0...v0.10.1)
|
28
|
+
|
29
|
+
## 0.10.0
|
30
|
+
|
31
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.9.1...v0.10.0)
|
32
|
+
|
33
|
+
## 0.9.1
|
34
|
+
|
35
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.9.0...v0.9.1)
|
36
|
+
|
37
|
+
## 0.9.0
|
38
|
+
|
39
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.8.1...v0.9.0)
|
40
|
+
|
41
|
+
## 0.8.1
|
42
|
+
|
43
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.8.0...v0.8.1)
|
44
|
+
|
45
|
+
* Support optional escaping of params.
|
46
|
+
([Tasos Laskos](https://github.com/zapotek)
|
47
|
+
* `Easy::Mirror`: Reduced object allocations and method calls during info handling.
|
48
|
+
([Tasos Laskos](https://github.com/zapotek)
|
49
|
+
|
50
|
+
## 0.8.0
|
51
|
+
|
52
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.7.3...v0.7.4)
|
53
|
+
|
54
|
+
* `Easy::Mirror`: Reduced object allocations and method calls during info handling.
|
55
|
+
([Tasos Laskos](https://github.com/zapotek)
|
56
|
+
|
57
|
+
## 0.7.4
|
58
|
+
|
59
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.7.3...v0.7.4)
|
60
|
+
|
61
|
+
* Support different array encodings for params.
|
62
|
+
([Marcello Barnaba](https://github.com/ifad), [\#104](https://github.com/typhoeus/ethon/pull/104))
|
63
|
+
* Programtic access to version infos.
|
64
|
+
([Jonas Wagner](https://github.com/jwagner), [\#90](https://github.com/typhoeus/ethon/pull/90))
|
65
|
+
|
66
|
+
|
67
|
+
## 0.7.3
|
68
|
+
|
69
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.7.2...v0.7.3)
|
70
|
+
|
71
|
+
* `Ethon::Curl::FDSet`
|
72
|
+
* Set `:fd_array` size to the current MS Windows `FD_SETSIZE` (2048).
|
73
|
+
([Tasos Laskos](https://github.com/zapotek)
|
74
|
+
|
75
|
+
* Added `redirect_time` value to available informations and `Easy::Mirror`.
|
76
|
+
([Adrien Jarthon](https://github.com/jarthod)
|
77
|
+
|
78
|
+
## 0.7.2
|
79
|
+
|
80
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.7.1...v0.7.2)
|
81
|
+
|
82
|
+
* FFI data-types updated to be more correct.
|
83
|
+
|
84
|
+
## 0.7.1
|
85
|
+
|
86
|
+
* MS Windows determination delegated to `Gem.windows?` for better accuracy.
|
87
|
+
* FFI data-types updated to work on MS Windows.
|
88
|
+
|
89
|
+
## 0.7.0
|
90
|
+
|
91
|
+
Not backwards compatible changes:
|
92
|
+
|
93
|
+
* `mime-types` are no longer a dependency. The gem will be still used if available to determine the mime type of a file which is uploaded. That means you have to have take care of the gem installation yourself.
|
94
|
+
|
95
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.6.3...v0.7.0)
|
96
|
+
|
97
|
+
## 0.6.3
|
98
|
+
|
99
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.6.2...v0.6.3)
|
100
|
+
|
101
|
+
## 0.6.2
|
102
|
+
|
103
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.6.1...v0.6.2)
|
104
|
+
|
105
|
+
## 0.6.1
|
106
|
+
|
107
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.6.0...v0.6.1)
|
108
|
+
|
109
|
+
The changelog entries are coming soon!
|
110
|
+
|
111
|
+
## 0.6.0
|
112
|
+
|
113
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.5.12...v0.6.0)
|
114
|
+
|
115
|
+
The changelog entries are coming soon!
|
116
|
+
|
117
|
+
Bugfixes:
|
118
|
+
|
119
|
+
* URL-encode nullbytes in parameters instead of escaping them to `\\0`.
|
120
|
+
([Tasos Laskos](https://github.com/zapotek)
|
121
|
+
|
122
|
+
## 0.5.12
|
123
|
+
|
124
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.5.11...v0.5.12)
|
125
|
+
|
126
|
+
Enhancements:
|
127
|
+
|
128
|
+
* Performance optimizations.
|
129
|
+
([Kyle Oppenheim](https://github.com/koppenheim) and [Richie Vos](https://github.com/richievos), [\#48](https://github.com/typhoeus/ethon/pull/48))
|
130
|
+
* Reuse memory pointer.
|
131
|
+
([Richie Vos](https://github.com/richievos), [\#49](https://github.com/typhoeus/ethon/pull/49))
|
132
|
+
|
133
|
+
Bugfixes:
|
134
|
+
|
135
|
+
* Fix windows install.
|
136
|
+
([Derik Olsson](https://github.com/derikolsson), [\#47](https://github.com/typhoeus/ethon/pull/47))
|
137
|
+
* Handle urls that already contain query params.
|
138
|
+
([Turner King](https://github.com/turnerking ), [\#45](https://github.com/typhoeus/ethon/pull/45))
|
139
|
+
|
140
|
+
## 0.5.11
|
141
|
+
|
142
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.5.10...v0.5.11)
|
143
|
+
|
144
|
+
Enhancements:
|
145
|
+
|
146
|
+
* Add support for postredirs, unrestricted_auth.
|
147
|
+
* Add support for cookie, cookiejar, cookiefile.
|
148
|
+
([erwanlr](https://github.com/erwanlr), [\#46](https://github.com/typhoeus/ethon/pull/46))
|
149
|
+
* Relax ffi requirements.
|
150
|
+
([voxik](https://github.com/voxik), [\#40](https://github.com/typhoeus/ethon/pull/40))
|
151
|
+
* Various documentation improvements.
|
152
|
+
([Craig Little](https://github.com/craiglittle))
|
153
|
+
|
154
|
+
Bugfixes:
|
155
|
+
|
156
|
+
* Fix the memory leaks.
|
157
|
+
([Richie Vos](https://github.com/richievos), [\#45](https://github.com/typhoeus/ethon/pull/45))
|
158
|
+
|
159
|
+
## 0.5.10
|
160
|
+
|
161
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.5.9...v0.5.10)
|
162
|
+
|
163
|
+
Enhancements:
|
164
|
+
|
165
|
+
* Allow custom requests.
|
166
|
+
([Nathan Sutton](https://github.com/nate), [\#36](https://github.com/typhoeus/ethon/pull/36))
|
167
|
+
* Use updated version of FFI.
|
168
|
+
|
169
|
+
Bugfixes:
|
170
|
+
|
171
|
+
* Fix windows install issue.
|
172
|
+
([brainsucker](https://github.com/brainsucker), [\#38](https://github.com/typhoeus/ethon/pull/38))
|
173
|
+
|
174
|
+
## 0.5.9
|
175
|
+
|
176
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.5.8...v0.5.9)
|
177
|
+
|
178
|
+
Enhancements:
|
179
|
+
|
180
|
+
* Allow to set multiple protocols.
|
181
|
+
|
182
|
+
## 0.5.8
|
183
|
+
|
184
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.5.7...v0.5.8)
|
185
|
+
|
186
|
+
Enhancements:
|
187
|
+
|
188
|
+
* Add support for protocols and redir_protocols(
|
189
|
+
[libcurl SASL buffer overflow vulnerability](http://curl.haxx.se/docs/adv_20130206.html)).
|
190
|
+
* Add max_send_speed_large and max_recv_speed_large([Paul Schuegraf](https://github.com/pschuegr), [\#33](https://github.com/typhoeus/ethon/pull/33))
|
191
|
+
|
192
|
+
## 0.5.7
|
193
|
+
|
194
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.5.6...v0.5.7)
|
195
|
+
|
196
|
+
Enhancements:
|
197
|
+
|
198
|
+
* Use new version of ffi.
|
199
|
+
|
200
|
+
## 0.5.6
|
201
|
+
|
202
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.5.4...v0.5.6)
|
203
|
+
|
204
|
+
Bugfixes:
|
205
|
+
|
206
|
+
* Easy#reset resets on_complete callbacks.
|
207
|
+
|
208
|
+
## 0.5.4
|
209
|
+
|
210
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.5.3...v0.5.4)
|
211
|
+
|
212
|
+
Enhancements:
|
213
|
+
|
214
|
+
* Use Libc#getdtablesize to get the FDSet size.
|
215
|
+
* New libcurl option accept_encoding.
|
216
|
+
* Documentation updates.
|
217
|
+
|
218
|
+
## 0.5.3
|
219
|
+
|
220
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.5.2...v0.5.3)
|
221
|
+
|
222
|
+
Enhancements:
|
223
|
+
|
224
|
+
* Deprecate Easy#prepare. It is no longer necessary.
|
225
|
+
* Unroll metaprogramming for easy and multi options.
|
226
|
+
* More specs.
|
227
|
+
|
228
|
+
Bugfixes:
|
229
|
+
|
230
|
+
* Correct size for FDSets
|
231
|
+
* Add proxytypes to enums.
|
232
|
+
|
233
|
+
## 0.5.2
|
234
|
+
|
235
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.5.1...v0.5.2)
|
236
|
+
|
237
|
+
Enhancements:
|
238
|
+
|
239
|
+
* New libcurl option keypasswd.
|
240
|
+
|
241
|
+
Bugfixes:
|
242
|
+
|
243
|
+
* Correct request logging when using multi interface.
|
244
|
+
* Remove invalid libcurl option sslcertpasswd.
|
245
|
+
|
246
|
+
## 0.5.1
|
247
|
+
|
248
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.5.0...v0.5.1)
|
249
|
+
|
250
|
+
Bugfixes:
|
251
|
+
|
252
|
+
* Mark Curl.select and Curl.easy_perform as blocking so that the GIL is
|
253
|
+
released by ffi.
|
254
|
+
|
255
|
+
## 0.5.0
|
256
|
+
|
257
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.4.4...v0.5.0)
|
258
|
+
|
259
|
+
Enhancements:
|
260
|
+
|
261
|
+
* New libcurl option proxyuserpwd
|
262
|
+
* Rename response_header to response_headers
|
263
|
+
|
264
|
+
Bugfixes:
|
265
|
+
|
266
|
+
* Mark Curl.select and Curl.easy_perform as blocking so that the GIL is
|
267
|
+
released by ffi.
|
268
|
+
|
269
|
+
## 0.4.4
|
270
|
+
|
271
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.4.3...v0.4.4)
|
272
|
+
|
273
|
+
Enhancements:
|
274
|
+
|
275
|
+
* Prepare multi explicit like easy
|
276
|
+
|
277
|
+
## 0.4.3
|
278
|
+
|
279
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.4.2...v0.4.3)
|
280
|
+
|
281
|
+
Enhancements:
|
282
|
+
|
283
|
+
* Remove deprecated libcurl option put
|
284
|
+
* More documentation
|
285
|
+
* New libcurl option connecttimeout_ms and timeout_ms
|
286
|
+
* Support multi options
|
287
|
+
|
288
|
+
Bugfixes:
|
289
|
+
|
290
|
+
* Handle nil values in query params
|
291
|
+
|
292
|
+
## 0.4.2
|
293
|
+
|
294
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.4.1...v0.4.2)
|
295
|
+
|
296
|
+
Enhancements:
|
297
|
+
|
298
|
+
* New libcurl option forbid_reuse
|
299
|
+
* Use libcurls escape instead of CGI::escape
|
300
|
+
|
301
|
+
## 0.4.1
|
302
|
+
|
303
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.4.0...v0.4.1)
|
304
|
+
|
305
|
+
Bugfixes:
|
306
|
+
|
307
|
+
* Handle nested hash in an array in params correct
|
308
|
+
( [\#201](https://github.com/typhoeus/typhoeus/issues/201) )
|
309
|
+
|
310
|
+
## 0.4.0
|
311
|
+
|
312
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.3.0...v0.4.0)
|
313
|
+
|
314
|
+
Enhancements:
|
315
|
+
|
316
|
+
* ruby 1.8.7 compatible
|
317
|
+
* Ethon.logger
|
318
|
+
* Deal with string param/body
|
319
|
+
* More documentation
|
320
|
+
|
321
|
+
Bugfixes:
|
322
|
+
|
323
|
+
* Add multi_cleanup to curl
|
324
|
+
|
325
|
+
## 0.3.0
|
326
|
+
|
327
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.2.0...v0.3.0)
|
328
|
+
|
329
|
+
Enhancements:
|
330
|
+
|
331
|
+
* New libcurl option proxyport
|
332
|
+
* Raise invalid value error when providing a wrong key for sslversion or httpauth
|
333
|
+
|
334
|
+
Bugfixes:
|
335
|
+
|
336
|
+
* Libcurl option sslversion is handled correct
|
337
|
+
|
338
|
+
## 0.2.0
|
339
|
+
|
340
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.1.0...v0.2.0)
|
341
|
+
|
342
|
+
Enhancements:
|
343
|
+
|
344
|
+
* GET requests are using custom requests only when there is a request body
|
345
|
+
* Easy#on_complete takes multiple callbacks
|
346
|
+
* raise Errors::GlobalInit when libcurls global_init failed instead of
|
347
|
+
runtime error
|
348
|
+
* raise Errors::InvalidOption if option is invalid
|
349
|
+
|
350
|
+
## 0.1.0
|
351
|
+
|
352
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.0.2...v0.1.0)
|
353
|
+
|
354
|
+
Enhancements:
|
355
|
+
|
356
|
+
* Documentation
|
357
|
+
( [Alex P](https://github.com/ifesdjeen), [\#13](https://github.com/typhoeus/ethon/issues/13) )
|
358
|
+
* New libcurl option dns_cache_timeout
|
359
|
+
( [Chris Heald](https://github.com/cheald), [\#192](https://github.com/typhoeus/typhoeus/pull/192) )
|
360
|
+
|
361
|
+
Bugfixes:
|
362
|
+
|
363
|
+
* Libcurl option ssl_verifyhost takes an integer.
|
364
|
+
* Add space between header key and value.
|
365
|
+
|
366
|
+
## 0.0.2
|
367
|
+
|
368
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.0.1...v0.0.2)
|
369
|
+
|
370
|
+
Bugfixes:
|
371
|
+
|
372
|
+
* Add libcurl.so.4 to ffi_lib in order to load correct lib on Debian.
|
373
|
+
* Escape zero bytes.
|
374
|
+
|
375
|
+
## 0.0.1 Initial version
|
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2012-2016 Hans Hasselberg
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,118 @@
|
|
1
|
+
[](https://badge.fury.io/rb/ethon)
|
2
|
+
[](https://github.com/typhoeus/ethon/actions/workflows/ruby.yml)
|
3
|
+
|
4
|
+
# Ethon
|
5
|
+
|
6
|
+
In Greek mythology, Ethon, the son of Typhoeus and Echidna, is a gigantic eagle. So much for the history.
|
7
|
+
In the modern world, Ethon is a very basic libcurl wrapper using ffi.
|
8
|
+
|
9
|
+
* [Documentation](http://rubydoc.info/github/typhoeus/ethon/frames/Ethon)
|
10
|
+
* [Website](http://typhoeus.github.com/)
|
11
|
+
* [Mailing list](http://groups.google.com/group/typhoeus)
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
With bundler:
|
16
|
+
|
17
|
+
gem "ethon"
|
18
|
+
|
19
|
+
With rubygems:
|
20
|
+
|
21
|
+
gem install ethon
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
Making the first request is simple:
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
easy = Ethon::Easy.new(url: "www.example.com")
|
29
|
+
easy.perform
|
30
|
+
#=> :ok
|
31
|
+
```
|
32
|
+
|
33
|
+
You have access to various options, such as following redirects:
|
34
|
+
|
35
|
+
```ruby
|
36
|
+
easy = Ethon::Easy.new(url: "www.example.com", followlocation: true)
|
37
|
+
easy.perform
|
38
|
+
#=> :ok
|
39
|
+
```
|
40
|
+
|
41
|
+
Once you're done you can inspect the response code and body:
|
42
|
+
|
43
|
+
```ruby
|
44
|
+
easy = Ethon::Easy.new(url: "www.example.com", followlocation: true)
|
45
|
+
easy.perform
|
46
|
+
easy.response_code
|
47
|
+
#=> 200
|
48
|
+
easy.response_body
|
49
|
+
#=> "<!doctype html><html ..."
|
50
|
+
```
|
51
|
+
|
52
|
+
## Http
|
53
|
+
|
54
|
+
In order to make life easier, there are some helpers for making HTTP requests:
|
55
|
+
|
56
|
+
```ruby
|
57
|
+
easy = Ethon::Easy.new
|
58
|
+
easy.http_request("www.example.com", :get, { params: {a: 1} })
|
59
|
+
easy.perform
|
60
|
+
#=> :ok
|
61
|
+
```
|
62
|
+
|
63
|
+
```ruby
|
64
|
+
easy = Ethon::Easy.new
|
65
|
+
easy.http_request("www.example.com", :post, { params: { a: 1 }, body: { b: 2 } })
|
66
|
+
easy.perform
|
67
|
+
#=> :ok
|
68
|
+
```
|
69
|
+
|
70
|
+
This is really handy when making requests since you don't have to care about setting
|
71
|
+
everything up correctly.
|
72
|
+
|
73
|
+
## Http2
|
74
|
+
Standard http2 servers require the client to connect once and create a session (multi) and then add simple requests to the multi handler.
|
75
|
+
The `perform` method then takes all the requests in the multi handler and sends them to the server.
|
76
|
+
|
77
|
+
See the following example
|
78
|
+
```ruby
|
79
|
+
multi = Ethon::Multi.new
|
80
|
+
easy = Ethon::Easy.new
|
81
|
+
|
82
|
+
easy.http_request("www.example.com/get", :get, { http_version: :httpv2_0 })
|
83
|
+
|
84
|
+
# Sending a request with http version 2 will send an Upgrade header to the server, which many older servers will not support
|
85
|
+
# See below for more info: https://everything.curl.dev/http/http2
|
86
|
+
# If this is a problem, send the below:
|
87
|
+
easy.http_request("www.example.com/get", :get, { http_version: :httpv2_prior_knowledge })
|
88
|
+
|
89
|
+
# To set the server to use http2 with https and http1 with http, send the following:
|
90
|
+
easy.http_request("www.example.com/get", :get, { http_version: :httpv2_tls }
|
91
|
+
|
92
|
+
multi.add(easy)
|
93
|
+
multi.perform
|
94
|
+
```
|
95
|
+
|
96
|
+
## LICENSE
|
97
|
+
|
98
|
+
(The MIT License)
|
99
|
+
|
100
|
+
Copyright © 2012-2016 [Hans Hasselberg](http://www.hans.io)
|
101
|
+
|
102
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
103
|
+
copy of this software and associated documentation files (the "Software"),
|
104
|
+
to deal in the Software without restriction, including without
|
105
|
+
limitation the rights to use, copy, modify, merge, publish, distribute,
|
106
|
+
sublicense, and/or sell copies of the Software, and to permit persons
|
107
|
+
to whom the Software is furnished to do so, subject to the following conditions:
|
108
|
+
|
109
|
+
The above copyright notice and this permission notice shall be included
|
110
|
+
in all copies or substantial portions of the Software.
|
111
|
+
|
112
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
113
|
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
114
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
115
|
+
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
116
|
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
117
|
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
118
|
+
OTHER DEALINGS IN THE SOFTWARE.
|