Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

11
  • In the absence of any information to the contrary, I guess you're right - if RFC3986 doesn't specify a standard then there isn't one. Thanks Eduardo. Commented Jan 5, 2016 at 14:43
  • 50
    A would suggest using id=a&id=b as boolean AND, and id=a,b as boolean OR. Commented May 7, 2016 at 5:13
  • 27
    FWIW PHP doesn't support reading args like ?id=5&id=3. PHP would only read in one value for id here. If I remember correctly, it would have to look like this for it to work with PHP: ?id[]=5&id[]=3 Commented Oct 7, 2016 at 16:26
  • 5
    +1 for since you are developing the APIs, I suggest you to do what is the easiest for you, since the caller of the API will not have much trouble creating the query string. Commented Jan 12, 2018 at 0:37
  • 16
    id=a,b makes the assumption that coma , is a valid delimiter. But your parameter values could contain a ,. Then the client needs to escape , in the query parameter values. But you could decide ; is better. It means the client and server should share the official delimiter for your API. id=a&id=b does not have this problem even though it makes urls longer Commented Jan 12, 2018 at 16:04