Releases: mamantoha/crest
v1.3.5
What's Changed
- Use specified params encoder for DataForm by @mamantoha in #189
Full Changelog: v1.3.4...v1.3.5
v1.3.4
What's Changed
- extract flatten_params(object : JSON::Any, parent_key = nil) by @mamantoha in #188
Full Changelog: v1.3.3...v1.3.4
v1.3.3
What's Changed
- docs: add mamantoha as a contributor for code by @allcontributors in #182
- docs: add cyangle as a contributor for code by @allcontributors in #183
- docs: add psikoz as a contributor for design by @allcontributors in #185
- Allow JSON::Any in FlatParamsEncoder and NestedParamsEncoder by @mamantoha in #187
New Contributors
- @allcontributors made their first contribution in #182
Full Changelog: v1.3.2...v1.3.3
Support encoding JSON::Any as hash values
What's Changed
- back VCR by @mamantoha in #180
- Support encoding JSON::Any as hash values with Crest::EnumeratedFlatParamsEncoder by @cyangle in #181
Full Changelog: v1.3.1...v1.3.2
Multipart form with IO
What's Changed
- remove vcr by @mamantoha in #178
- Multipart form with IO as hash value instead of just File by @cyangle in #179
Full Changelog: v1.3.0...v1.3.1
Upload File/IO::Memory/Bytes directly
v1.2.1
What's Changed
- Bug fixes and stability improvements for
Crest::Requests
by @mamantoha in #172
- Pass
tsl
parameter in redirects - Set
HTTP::Client#tsl
only for https requests
Full Changelog: v1.2.0...v1.2.1
Crest::ParamsDecoder
What's Changed
-
(breaking-change)
#decode
method extracted fromCrest::ParamsEncoder
toCrest::ParamsDecoder
by @mamantoha in #170query = "size=small&topping[1]=bacon&topping[2]=onion" Crest::ParamsDecoder.decode(query) # => {"size" => "small", "topping" => ["bacon", "onion"]}
-
Add
Crest::EnumeratedFlatParamsEncoder
by @mamantoha in #170response = Crest.post( "http://httpbin.org/post", {"size" => "small", "topping" => ["bacon", "onion"]}, params_encoder: Crest::EnumeratedFlatParamsEncoder ) # => curl -X POST http://httpbin.org/post -d 'size=small&topping[1]=bacon&topping[2]=onion' -H 'Content-Type: application/x-www-form-urlencoded'
-
Expose timeout options by @mamantoha in #171
Full Changelog: v1.1.0...v1.2.0
Custom params encoders
What's Changed
-
Tested with Crystal 1.3.0
-
Accept
Float32
andFloat64
as params value by @mamantoha in #166 -
Add custom params encoders by @mamantoha in #167
(thanks @cyangle for the idea in #162)It is now possible to use a custom params encoder. For example
Crest::NestedParamsEncoder
:response = Crest.post( "http://httpbin.org/post", {"size" => "small", "topping" => ["bacon", "onion"]}, params_encoder: Crest::NestedParamsEncoder ) # => curl -X POST http://httpbin.org/post -d 'size=small&topping=bacon&topping=onion' -H 'Content-Type: application/x-www-form-urlencoded'
By defaulf
Crest::FlatParamsEncoder
is used:response = Crest.post( "http://httpbin.org/post", {"size" => "small", "topping" => ["bacon", "onion"]} ) # => curl -X POST http://httpbin.org/post -d 'size=small&topping[]=bacon&topping[]=onion' -H 'Content-Type: application/x-www-form-urlencoded'
New Contributors
Full Changelog: v1.0.1...v1.1.0