I've got a signup HTML form with a username field that I want to check against registered usernames to ensure uniqueness. I considered making a GET request to api/users/:username, if it returns 200 consider taken, if 404 consider available.
Is this overkill for what I'm trying to do since I would be returning the actual user at every request (which happens when the input field changes)? If so what alternatives would you guys suggest.
Make a HEAD request and just get the headers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With