Skip to content

v1.2.0 (Sep 06, 2024)

Choose a tag to compare

@ryz310 ryz310 released this 06 Sep 08:35
· 492 commits to master since this release
e1aec90

Feature

  • #1048 Support lazy evaluation for request headers and body parameters (@ryz310)
    The API client allows lazy evaluation for request headers and body parameters.
    For example, a time-limited token can be issued immediately before the request.

    class ExampleApiClient < MyApiClient::Base
      def get_users
        get 'users', headers: headers, query: { key: 'value' }
      end
    
      private
    
      def headers
        lambda do
          new_access_token = issue_new_access_token!
          {
            'Content-Type': 'application/json;charset=UTF-8',
            'Authorization': "Bearer #{new_access_token}",
          }
        end
      end
    end

Misc

  • #1049 Update supporting ruby and rails versions (@ryz310)
    Support Ruby 3.3, Rails 7.1 and 7.2
    End of supporting Ruby 3.0 👋

Dependabot