Skip to content

Releases: mamantoha/crest

v1.3.5

27 Sep 10:22
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.3.4...v1.3.5

v1.3.4

26 Sep 16:44
Compare
Choose a tag to compare

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

26 Sep 15:44
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.3.2...v1.3.3

Support encoding JSON::Any as hash values

26 Sep 08:16
Compare
Choose a tag to compare

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

30 May 07:58
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.3.0...v1.3.1

Upload File/IO::Memory/Bytes directly

28 May 09:02
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.2.1...v1.3.0

v1.2.1

17 Feb 09:02
Compare
Choose a tag to compare

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

14 Feb 10:21
Compare
Choose a tag to compare

What's Changed

  • (breaking-change) #decode method extracted from Crest::ParamsEncoder to Crest::ParamsDecoder by @mamantoha in #170

    query = "size=small&topping[1]=bacon&topping[2]=onion"
    Crest::ParamsDecoder.decode(query)
    # => {"size" => "small", "topping" => ["bacon", "onion"]}
    
  • Add Crest::EnumeratedFlatParamsEncoder by @mamantoha in #170

    response = 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

23 Jan 11:07
Compare
Choose a tag to compare

What's Changed

  • Tested with Crystal 1.3.0

  • Accept Float32 and Float64 as params value by @mamantoha in #166

  • Add read_timeout support by @kates in #169

  • 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

v1.0.1

23 Dec 09:02
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.0.0...v1.0.1