Skip to content
This repository was archived by the owner on Jul 7, 2020. It is now read-only.
This repository was archived by the owner on Jul 7, 2020. It is now read-only.

Using queryStrings with arrays #161

@AlanFoster

Description

@AlanFoster

Hey;

Just a quick question about the serialization for array query strings within fluxthis.

We're currently attempting to send an array via the params option of the ApiActionCreators.
Over the wire I would have expected this format:

items[]=uuid1&items[]=uuid2

Currently it is serialized as:

items[0]=uuid1&items[1]=uuid

Rails, Express, and PHP currently rely on the first format to identify a query string param as an array. However, if I understand correctly there is currently no formal specification for this.

My thoughts are:

  • We could update flux to support the 'more common' convention of arrays, however this would most likely be a Backwards incompatible change for some individuals
  • Allow fluxthis ApiActionCreators to be configured with an appropriate query string serializer, as this would allow for ApiActionCreators to handle each specific server's definition of Arrays/Nested objects etc within a query string

I think the best approach would be option 2. Any thoughts on a PR which provides a configurable implementation of makeQueryString ?

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