Extra character / when adding URL parameters to a GET API request

Currently when I try to use URL parameters Retool adds automatically an extra / at the endpoint before the ? causing the endpoint to NOT work.

In attachment I leave two screenshots:

  • one without URL parameters which is OK.
  • the other with an extra URL parameter per_page which is NOT OK.


Is the resource setup with a trailing /? It looks like it's trimming it when params are not present but includes it when they're present.

No, on the setup the endpoint doesn't ends with /.

Weird!

Is there any solution or workaround for this issue?

Without proper pagination we can't use Retool for our needs.

Thank you for surfacing this @fmartins and thank you for looking into this @kschirrmacher!

We were able to reproduce the issue on our end and are actively looking into this with our engineering team now. We'll let you know once this is resolved!

1 Like

Since it seems like this has ben the behavior for quite a few versions, we likely won't be prioritizing any changes here.

To unblock you, you can configure your REST endpoint to ignore trailing slashes!

Also, it looks like you configured your Base URL to have a fragment /purchaseorders


Ideally, you could just use the server domain and save the fragment for the Query config in the app!

Example: