hypothesis / lms

LTI app for integrating with learning management systems
BSD 2-Clause "Simplified" License
46 stars 14 forks source link

Avoid question mark in API calls without query string #6455

Closed acelaya closed 1 month ago

acelaya commented 1 month ago

While working on something else, I realized we were making API calls with a question mark at the end of the URL when providing an empty object as query params, or an object where all the props would end-up resulting in an ignored param, like an empty array.

This PR changes the logic a bit to avoid this, which is technically not incorrect, but it is aesthetically nicer to avoid the question mark when not needed.