-
Michael Herold authored
* Update to Faraday v2 Faraday 2 has been out for a year and is the recommended version to use by the community now. This change updates the dependency to Faraday 2 and drops the middleware bundle since it is incompatible. This change has one regression, but it's a regression for the state of the world as it was in 2012. Back then, it was pretty common for APIs to respond to JSON requests with `text/javascript` or `application/javascript` for their Content-Type, which was incorrect. Faraday Middleware contains a kludge to paper over that fact, which you can see [in the source][1]. Faraday 2 drops this kludge because most APIs are well-behaved now with respect to Content-Type. This introduces a minor regression in Bridgetown in the event that someone has a preexisting site that queries one of these misbehaved APIs. [1]: https://github.com/lostisland/faraday_middleware/blob/e68ff84470705c8a59d9aa99b98cb36101fa10ad/lib/faraday_middleware/response/parse_json.rb#L16-L44 * Update old blog posts to reflect Faraday 2 Since we're updating to Faraday 2, these blog posts should reflect how to do it in the current version instead of the old version. We might not want to make this change until releasing 1.3, though. --------- Co-authored-by:
Jared White <jared@whitefusion.studio>
Michael Herold authored* Update to Faraday v2 Faraday 2 has been out for a year and is the recommended version to use by the community now. This change updates the dependency to Faraday 2 and drops the middleware bundle since it is incompatible. This change has one regression, but it's a regression for the state of the world as it was in 2012. Back then, it was pretty common for APIs to respond to JSON requests with `text/javascript` or `application/javascript` for their Content-Type, which was incorrect. Faraday Middleware contains a kludge to paper over that fact, which you can see [in the source][1]. Faraday 2 drops this kludge because most APIs are well-behaved now with respect to Content-Type. This introduces a minor regression in Bridgetown in the event that someone has a preexisting site that queries one of these misbehaved APIs. [1]: https://github.com/lostisland/faraday_middleware/blob/e68ff84470705c8a59d9aa99b98cb36101fa10ad/lib/faraday_middleware/response/parse_json.rb#L16-L44 * Update old blog posts to reflect Faraday 2 Since we're updating to Faraday 2, these blog posts should reflect how to do it in the current version instead of the old version. We might not want to make this change until releasing 1.3, though. --------- Co-authored-by:
Jared White <jared@whitefusion.studio>
Loading