Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QueryParams attribute with map[string]string type doesn't support query array params #394

Open
daltemen opened this issue May 28, 2020 · 1 comment
Labels
status: help wanted requesting help from the community type: community enhancement feature request not on Twilio's roadmap

Comments

@daltemen
Copy link

Hello everyone.

I'm trying to get the category stats. https://sendgrid.com/docs/API_Reference/Web_API_v3/Stats/categories.html

this service supports query array params
...&categories=cat1&categories=cat2

and i see that the Request struct:

// Request holds the request to an API Call.
type Request struct {
	...
	QueryParams map[string]string
	...
}

of course you can't have two equal keys.

I've temporarily solved it by creating some functions to use directly

params := url.Values{}

perhaps it is an improvement that the query params can be rather.

// Request holds the request to an API Call.
type Request struct {
	...
	QueryParams map[string][]string
	...
}

Technical details:

  • sendgrid-go version: v3.5.0
  • go version: go1.13.6
@childish-sambino childish-sambino added status: help wanted requesting help from the community type: community enhancement feature request not on Twilio's roadmap labels Jun 8, 2020
@childish-sambino
Copy link
Contributor

This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: help wanted requesting help from the community type: community enhancement feature request not on Twilio's roadmap
Projects
None yet
Development

No branches or pull requests

2 participants