request.query in http-functions gives odd output

I have an http function which receives a querystring. I want to extract the value of a querystring field which I did as follows

export function myFunc(request){
    let qsId = req.query['id'];
    //further processing using qsUrl
}

When I inspect the value of qsUrl by echoing it back in the http response, I see this -

abc123, https://<my-wix-url>/_functions/myFunc?id=abc123

I expect to only see abc123 without the trailing , https:///_functions/myFunc?id=abc123 so this behavior is blocking me.

Help?

I tested this with curl and from a webapp. Same result in both cases.