ew00github / HTTPCatClone

Recreation of http.cat
0 stars 0 forks source link

Create an endpoint that returns all statuses within a group #12

Closed BradRammel closed 11 months ago

BradRammel commented 11 months ago

Maybe create an endpoint like "/statusGroup/{status}". Valid input for the status value should be limited to 100, 200, 300, 400, 500 and it should return all statuses between the number entered and the number entered + 99.

Ex: I send a request to "/statusGroup/200" I should get all statuses between 200 and 299. If the input is 300 then I should get all statuses between 300 and 399.

If the user gives invalid input ex: "/statusGroup/600" then you should throw a 400 response or something like that