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

Added support for arrays in query string #282

Merged
merged 1 commit into from Jul 16, 2015

Conversation

Projects
None yet
3 participants
@jbvanzuylen
Contributor

jbvanzuylen commented Jul 15, 2015

Examples:

GET /elements?type[]=IMAGE&type[]=VIDEO
GET /translations?language[]=en&language[]=fr&language[]=de
Added support for arrays in query string
Examples:

```
/elements?type[]=IMAGE&type[]=VIDEO
/translations?language[]=en&language[]=fr&language[]=de
```
@guillaume-boivin

This comment has been minimized.

Show comment
Hide comment
@guillaume-boivin

guillaume-boivin Jul 15, 2015

Contributor

👍

Contributor

guillaume-boivin commented Jul 15, 2015

👍

@atuttle

This comment has been minimized.

Show comment
Hide comment
@atuttle

atuttle Jul 16, 2015

Owner

This looks great, thanks! Is this the format that jQuery sends when your AJAX data attribute contains an array? It looks familiar but I'm not a regular user of the format...

Owner

atuttle commented Jul 16, 2015

This looks great, thanks! Is this the format that jQuery sends when your AJAX data attribute contains an array? It looks familiar but I'm not a regular user of the format...

@jbvanzuylen

This comment has been minimized.

Show comment
Hide comment
@jbvanzuylen

jbvanzuylen Jul 16, 2015

Contributor

Hello Adam,

Yes, jQuery will call this URL:

GET /translations?language[]=en&language[]=fr&language[]=de

with this code:

var params = {
  languages: ["en", "fr", "de"]
};
$.ajax({
  type: "GET",
  url: "translations",
  data: params
});
Contributor

jbvanzuylen commented Jul 16, 2015

Hello Adam,

Yes, jQuery will call this URL:

GET /translations?language[]=en&language[]=fr&language[]=de

with this code:

var params = {
  languages: ["en", "fr", "de"]
};
$.ajax({
  type: "GET",
  url: "translations",
  data: params
});

@atuttle atuttle added this to the Taffy 3.1 milestone Jul 16, 2015

atuttle added a commit that referenced this pull request Jul 16, 2015

@atuttle atuttle merged commit 7aba85e into atuttle:master Jul 16, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment