You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure whether it's a good idea to just append though. I would rather expect it to replace whatever's on the URL.
I guess it depends on the API. Some expect array values to be defined as a=foo&a=bar, where others expect a=foo,bar (or even more abstract). But I'm fine with using .set as the default and go for the a=foo,bar approach (shorter = nicer!).
The searchParams option could be either an object, string, or URLSearchParams instance. Same as what new URLSearchParams() supports.
Sounds good! maybe also add an alias for it like sp (searchParams) ? or qs? (which is more widely known I'd say). Opinions?
I've added a very simple wrapper around fetch myself and added the ability to passing in a
qs
object, which adds some parameters to the url:it's a nicer api then just adding these to the url by hand.
I could make a PR if interested.
The text was updated successfully, but these errors were encountered: