Skip to content
This repository has been archived by the owner on Feb 1, 2020. It is now read-only.

Sample application - pagination does not seem to work correctly #7

Open
thaingo opened this issue Apr 27, 2019 · 1 comment
Open

Sample application - pagination does not seem to work correctly #7

thaingo opened this issue Apr 27, 2019 · 1 comment

Comments

@thaingo
Copy link

thaingo commented Apr 27, 2019

Hi @olOwOlo,
Thanks for great job.

I started playing around with the sample application and looks like the pagination does not seem to work correctly. Hope that you could look into this.

Steps to reproduce:

  1. Run the sample application
  2. use Postman to send (25) POST request http://localhost:8080/api/user
  3. use Postman to send GET request http://localhost:8080/api/user?page[number]=1&page[size]=3&page[totals]

Then the sample application returns HTTP Status 400 – Bad Request

Also, could you please advise the following case given that created already 25 users:
I try making GET request http://localhost:8080/api/user without pagination params, then the sample application returns data of 20 users only which is correct as per the default configuration. The question now is how to get the rest of 5 users created?

Appreciate your time.
Thai

@scathers
Copy link

Spring Boot can't handle the square brackets--they're considered illegal characters in a URL--so instead of sending parameters like page[size]=3, you need to encode them like page%5Bsize%5D=3.

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

No branches or pull requests

2 participants