Open sazzer opened 8 years ago
Turns out, from having just looked at the code, the problem is more in the documentation than the code. If I use a configuration of:
hal: {
query: '?offset={offset}&pageSize={pageSize}&q={q}'
}
then it does as I'd expect. It does unfortunately include query parameters that weren't provided on the request though, but gives them empty values.
If the "params" entry is not included on the route configuration then no querystring parameters are included on the self link at all.
If a "params" entry is included on the route configuration then the values are appended but not correctly formatted.
For example, when requesting a URL of '/items?offset=10&pageSize=5&q=item'. A configuration of:
will produce a Self link of '/items'
Whereas a configuration of
will produce a Self link of '/items10,5,item' instead of the URL that I would have expected, which is '/items?offset=10&pageSize=5&q=item'