Skip to content
This repository has been archived by the owner on Jan 26, 2023. It is now read-only.

Array style params #1

Closed
chrissnyder opened this issue May 27, 2015 · 1 comment
Closed

Array style params #1

chrissnyder opened this issue May 27, 2015 · 1 comment

Comments

@chrissnyder
Copy link
Contributor

Not sure if this is an issue per-se with the library.

For array-style params, it currently encodes them like so:

testParams = {
  someArray: ['foo", 'bar']
}

http://www.example.com/?someArray=foo,bar

I couldn't find an RFC that specified a best-practices there. That said, Rails expects arrays to be in the following format:

http://www.example.com/?someArray[]=foo&someArray[]=bar

For context, I ran into this on the Talk API where the search route allows you to specify different types to search under, but it expects it in the second form.

@brian-c
Copy link
Contributor

brian-c commented May 27, 2015

This was a client for (an old version of) the JSON API spec: http://jsonapi.org/format/. In practice it's ending up being pretty Panoptes-specific. Talk should be following Panoptes. If it's not, this library might not be appropriate for it.

edpaget added a commit that referenced this issue Sep 14, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants