Skip to content

stringify: can I use "encode: false" and "format: 'RFC1738'" options together #509

@dante-blitz

Description

@dante-blitz

I am new to qs and am using it as part of react-instantsearch

I have the following code:

const queryString = qsModule.stringify(routeState, {
  encode: false,
  format: 'RFC1738',
})

which is giving me:

?music[0]=Hip%20Hop

Ideally I want the following

?music[0]=Hip+Hop

I've noticed that if I disable the "encoding: false" option I get:

?music%5B0%5D=Hip+Hop

Is there a way to combine both options to get the desired result...

?music[0]=Hip+Hop

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions