on 2024 Dec 12 12:23 PM
Hi community,
I'm trying to figure out the correct way to access the $skip and $top query parameters on a request that's inside a $batch request. The reason is, that I need to transform those parameters and pass the request on to a remote system.
this.on('READ', Contents, async (req: Request) => {
...
}
I tried req.query and req.http.req.query but both only return {}.
While debugging, I found that the following ways work but are undocumented, so I'm not sure if it's safe to use them.
console.log(req.req.query) // {'$skip': '0', '$top': '20'}
console.log(req._.req.query) // {'$skip': '0', '$top': '20'}
Any recommendations?
Request clarification before answering.
You can find them in the query:
const skip = req.query.SELECT.limit?.offset?.val
const top = req.query.SELECT.limit?.rows?.val
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
53 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.