since got@11.0.0, .paginate() no longer send the body (json payload) of an allowGetBody query
Actual behavior
the json payload (a filter expression) is not sent to the server which returns the whole set of records
Expected behavior
Like in got@10.x the server should only return the records matching the filter (i.e. the json payload)
Code to reproduce
I have two simple allowGetBody test cases. In order to run, test/helpers/with-server.ts needs to be changed in lines 16-20:
const server = await createTestServer({
bodyParser: {
// type: () => false
}
}) as ExtendedTestServer;
This enable the bodyParser middleware to properly populate request.body. Because I do not fathom the possible impact of above change, I won't issue a PR.
this is a spinoff of #1171
since got@11.0.0,
.paginate()
no longer send the body (json payload) of anallowGetBody
queryActual behavior
the json payload (a filter expression) is not sent to the server which returns the whole set of records
Expected behavior
Like in got@10.x the server should only return the records matching the filter (i.e. the json payload)
Code to reproduce
I have two simple allowGetBody test cases. In order to run,
test/helpers/with-server.ts
needs to be changed in lines 16-20:This enable the bodyParser middleware to properly populate
request.body
. Because I do not fathom the possible impact of above change, I won't issue a PR.First a simple and successful test
Now with .paginate() (it fails)
Checklist