Support GET requests in Base Client request_class#118
Open
ishields wants to merge 1 commit intocustomerio:mainfrom
Open
Support GET requests in Base Client request_class#118ishields wants to merge 1 commit intocustomerio:mainfrom
ishields wants to merge 1 commit intocustomerio:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for GET HTTP requests to the BaseClient.request_class method, enabling API calls that require GET requests such as retrieving collections.
Key changes:
- Added
:getcase to therequest_classmethod to support GET requests
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+75
to
+76
| when :get | ||
| Net::HTTP::Get |
There was a problem hiding this comment.
The GET request support lacks test coverage. Consider adding a test case in spec/base_client_spec.rb similar to the existing tests for PUT requests, to verify that GET requests work correctly with both authentication methods (site_id/api_key and app_key).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Simple PR to allow sending GET requests since some API calls require it. For example, this allows api calls like GET Collections to work:
Issue was written up here:
#117