Conversation
| @@ -1,5 +1,11 @@ | |||
| # Changelog | |||
|
|
|||
| ## [1.1.0] - 2026-02-11 | |||
There was a problem hiding this comment.
🤔 Arguably we could do a major version bump since there are breaking changes in here, but i don't feel strongly about it
There was a problem hiding this comment.
Major version bump sounds good in any other scenario. However, I do like being able to eye-ball a semver across all our ruby repos and see if includes the ruby + faraday upgrade or not. Currently, all gems we maintain with Ruby 4.0 and/or Faraday 2.14 have a semver 1.x
For that selfish reason, I'll keep the semver as is.
| req.params = params | ||
| req.headers['ens-auth-token'] = ens_auth_key | ||
| req.body = ::JSON.generate(body) unless body.empty? | ||
| req.body = body unless body.empty? |
There was a problem hiding this comment.
If I understand this correctly, we no longer need the JSON.generate and to explicitly set the Content-Type of the request, because the connection setup already specifies :json?
There was a problem hiding this comment.
Yes. Faraday handles setting the content-type and wiring up the JSON middleware.
| shared_examples_for 'list pages' do | ||
| it 'should get pages' do | ||
| stub_request(:get, pages_url) | ||
| .with(headers: standard_headers, query: { 'type' => page_type, 'status' => page_status }) |
There was a problem hiding this comment.
Are we not sending the Content-Type on these requests anymore? Why not?
There was a problem hiding this comment.
The Faraday :json request middleware only sets Content-Type when it encodes a body, so GET requests lose the header. Is there a reason we want to set the Content-Type on every request?
There was a problem hiding this comment.
Aha, that makes sense! This is fine, I just wanted to understand why the behavior was changing.
No description provided.