First of all, thank you for the nice article!
I am curious on why you need to check for the empty string for success, wouldn't checking the Response HTTP Status Code enough? My expectation would be that for success the response would be 200 or 204 and in case of failure 500, 400 or something else that indicates failure.
That's a great idea, I'm going to look into this! I'm still learning as I go, and this was the best method I came up with as I am also new to working with web development in general, so I appreciate the pointer. This actually sounds like a cleaner way to do it.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
First of all, thank you for the nice article!
I am curious on why you need to check for the empty string for success, wouldn't checking the Response HTTP Status Code enough? My expectation would be that for success the response would be 200 or 204 and in case of failure 500, 400 or something else that indicates failure.
That's a great idea, I'm going to look into this! I'm still learning as I go, and this was the best method I came up with as I am also new to working with web development in general, so I appreciate the pointer. This actually sounds like a cleaner way to do it.