Skip to content

Customerio::BaseClient does not support GET endpoints - "::InvalidRequest: Invalid request method :get when fetching collections" #117

@ishields

Description

@ishields

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions