This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
$http doesn't support nested params for GET #2091
Closed
Description
We have an API that expects nested parameters. We'd previously been communicating with this API fine using
Two possible solutions for us right now are to use POST instead, or to manually construct a flat object with name value pairs first using $.param and then pass that into $http like so:
obj = {}
_.map $.param(params).replace(/\+/g, "%20").split("&"), (pair) ->
[name, value] = _.map(pair.split("="), (i) -> decodeURIComponent(i))
obj[name] = value
obj
This is obviously not ideal. Is it possible to get Angular to use a more jQuery-like param serializing method for GET requests?