Skip to content
This repository was archived by the owner on Jan 18, 2021. It is now read-only.

Incorrect request parameter when using only one queryNext option #51

Open
bagau opened this issue Apr 5, 2019 · 2 comments
Open

Incorrect request parameter when using only one queryNext option #51

bagau opened this issue Apr 5, 2019 · 2 comments
Assignees
Labels
Milestone

Comments

@bagau
Copy link

bagau commented Apr 5, 2019

When I use only one option sprLib.list().items({ queryNext: { prevId: 29, maxItems: 5 } }), it requests like this http://localhost:3000/_api/lists/getbytitle('UsersDetail')/items&p_ID=29&$top=5.
You can see than before p_ID=29 stand & intstead of ?.
And I get an error Invalid argument.

But if I add more than one option on request, like this:
sprLib.list(usersList).items({ listCols: ['ID'], queryNext: { prevId: 29, maxItems: 5 } });, my request is good http://localhost:3000/_api/lists/getbytitle('UsersDetail')/items?%24skiptoken=Paged%3dTRUE%26p_ID%3d29&%24select=ID&p_ID=29&$top=5 and before my first GET argument stands question symbol ?

@gitbrent gitbrent self-assigned this Apr 6, 2019
@gitbrent gitbrent added the bug label Apr 6, 2019
@gitbrent
Copy link
Owner

gitbrent commented Apr 6, 2019

Hi @bagau

When no column names are provided, the library attempts to retrieve all the columns (/items), but this behavior runs into trouble when options are provided.

@gitbrent gitbrent added this to the 1.10.0 milestone Apr 6, 2019
@TimVanOnckelen
Copy link

Any chanse on fixing this bug in the feature?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants