customerio-ruby
customerio-ruby copied to clipboard
Customerio::BaseClient does not support GET endpoints - "::InvalidRequest: Invalid request method :get when fetching collections"
It appears that the customer io client does not support GET requests. The endpoint to fetch collections is a GET and so this fails.
Example usage: @client.request_and_verify_response(:get, "/v1/api/collections")
Endpoint I am trying to use. https://docs.customer.io/journeys/collections/#retrieve-a-list-of-all-your-collections
# /.rvm/gems/ruby-3.4.2/gems/customerio-5.3.0/lib/customerio/base_client.rb:68
def request_class(method)
case method
when :post
Net::HTTP::Post
when :put
Net::HTTP::Put
when :delete
Net::HTTP::Delete
else
raise InvalidRequest.new("Invalid request method #{method.inspect}")
end
end
opened fix for this https://github.com/customerio/customerio-ruby/pull/118