Attempting to send an array list parameter. The codeList
parameter contains an array like this:
[
{
"projCode": "11-1115",
"cblTagNo": "571_GE001-RC1"
},
{
"projCode": "11-1115",
"cblTagNo": "571_GE001-S"
}
]
Encountering the error message
"invalid params object, needs to be an object with strings"
. How can I correctly pass the obj array?
Here is the http call method being used.
checkCableTagList(codeList: String[]){
this.http.setDataSerializer('json');
console.log(JSON.stringify(codeList));
return this.http.get('http://hostname/cable/v2/cableschedule/key/', codeList, {});
}
I also tried the following approach, which was unsuccessful.
return this.http.get('http://hostname/cable/v2/cableschedule/key/', JSON.stringify(codeList), {});