with this code I am trying to send a $http.get request to my rest service:
$http({
method: 'GET',
url: '/api/item/all',
params: {
query: {
userid: 7
},
fields: 'title'
}
});
I expected to access this URL:
/api/item/all?query[userid]=7&fields=title
but I am always getting a malformed url...
So, how to proceed?
Or even better: Is it possible to pass the full request url into the url-param of $http?
"query[userid]" : 7 , fields: 'title'
– charlietfl Jul 11 at 23:46userid
is a variable. Alternatively creating the string in advance is not an issue either – charlietfl Jul 11 at 23:56