I was writing a unit test for POST requests on an api endpoint and was wondering why no data was being returned. I tried logging the request object and the data expected was being sent back; it was a wild situation that I almost threw the towel in. Apparently, the endpoint was responding with a 204 status code that literally meant NO CONTENT. That's a funny TIL moment for me.
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.
I was writing a unit test for
POST
requests on an api endpoint and was wondering why no data was being returned. I tried logging the request object and the data expected was being sent back; it was a wild situation that I almost threw the towel in. Apparently, the endpoint was responding with a204
status code that literally meantNO CONTENT
. That's a funny TIL moment for me.