ljharb / qs

A querystring parser with nesting support
BSD 3-Clause "New" or "Revised" License
8.51k stars 729 forks source link

Stringify does not work with hyphen. #383

Closed therpobinski closed 4 years ago

therpobinski commented 4 years ago

Hi, hope you can help me, I am instantiating axios to make a request to an external API. The problem is that when I use parameters I have to convert them with qs.tringify and these parameters are separated by hyphens. This returns an error to me: TypeError: Converting circular structure to JSON. When I remove the hyphens it doesn't cause the problem, but in my case it is necessary to send the parameter with the intermediate hyphens for the parameter to be recognized. This is a snippet of my code. imagen

ljharb commented 4 years ago

Which hyphens? This snippet doesn't share what params is.

therpobinski commented 4 years ago

In the access-tokenparameter there is a -, which hyphens interferes with stringify. But removing the - leaves no problem. The conflict is that in my case it is mandatory to send an access token with the -.

therpobinski commented 4 years ago

For whatever reason, simply restarting my server fixed everything. Sorry to disturb you. I already closed this case. Thank you!