Passing parameter array list on http native get method typescript

I am trying to pass array list parameter . parameter codeList contains array like [{“projCode”:“11-1115”,“cblTagNo”:“571_GE001-RC1”},{“projCode”:“11-1115”,“cblTagNo”:“571_GE001-S”}] . but I am facing the error
" invalid params object, needs to be an object with strings".
May I know how to pass the obj array. Here is my http call method.

return this.http.get('http://hostname/cable/v2/cableschedule/key/',codeList,{});

I have tried this way . It didn’t work as well. ->
return this.http.get(‘http://hostname/cable/v2/cableschedule/key/’, JSON.stringify(codeList), {});

If you aren’t the one who wrote the backend, then ask whoever did what to do.

If you are the one writing the backend, and you can’t convert this codeList to something that can be put in a query string (and given the sample you’ve provided, that looks potentially gnarly), then it might be best to convert this from GET to something that takes a payload, such as POST.

1 Like

Thank you. I will try with POST method.