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

Conversation

@inomn
Copy link

@inomn inomn commented Jun 20, 2018

The same that #67
But:

  • with code review fixes, because the original PR is not updated since.
  • using yarn (not npm)

Here is original motivation by @klall

When performing a GET request for an individual asset
from the Shopify Admin API I noticed there isn't support for
nested query parameters.

For example performing this request:
GET /admin/themes/#{id}/assets.json?asset[key]=templates/index.liquid&theme_id=828155753
(https://help.shopify.com/api/reference/asset)

results in a query string seen by the server as follows:
{ theme_id: '11949473849',
asset: { key: 'assets/dci_locales.json' } }

However, the library querystring doesn't support nested objects and
therefore the final request URL sent to shopify isn't formed properly.

It works perfectly if I swap out the querystring library with the qs library.

@inomn inomn changed the title Qs fix Querystring Nesting support Jun 20, 2018
@inomn inomn closed this Jun 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant