Consider use of qs library to serialize data into the url
Right now we are serializing the data into the url with an implementation mirroring ajax. See serializeQueryParams.
https://github.com/ljharb/qs
e.g.
qs.stringify({ a: { b: { c: 'd', e: 'f' } } });
// 'a[b][c]=d&a[b][e]=f'
ref #7824 See - https://github.com/ljharb/qs#rfc-3986-and-rfc-1738-space-encoding
This library would also resolve https://github.com/emberjs/data/pull/7721
assert.equal(qs.stringify({ a: '' }), 'a=');
This is likely more bytes than what we could write ourselves. However, this would make us "more robust" and less prone to issues for our users.
I was looking into this package myself yesterday, was a bit concerned though looking at the bundle size for it (https://bundlephobia.com/package/[email protected])
https://github.com/sindresorhus/query-string might also be of interest
For the RequestManager RFC https://github.com/emberjs/rfcs/pull/860 url building is brought out of adapter in a way that this is mostly a consuming app concern. I don't think we need to change what the adapters do today; however, we may want to consider a new default for the url-builder utility.
qs being a cjs module (and a rather large one at that) is a non-starter and query-string hides its size with dependencies. There's probably one that is built for browsers only that is fairly tiny, we should research.
we've implemented a simple query string builder that's optional for the request builders work. If someone wants to use qs (highly discouraged fwiw) all they need to do is install qs and use it to build their query params for the url they pass to request