Status 204 No Content

I have an api which I have done with Go, the question is that it does not respond to / api / comments / when I use postman, it sends me a status 204 no content, I have my controller who sends me the information of the comments, but not send the information, I attach the code with a image.


Hi. It sends that status if it find no comments. Do the query find any comments? Use a debugger or insert some print statements in the code.

Please try to make your code a lot shorter before pasting it, and also use copy&paste in a markdown codeblock. For me your screenshot is undreadable, as it does not use a fixed width font, does not follow my color schema, and especially because it is not searchable or copyable.

Aside of that, I have to second @johandalabacka, unless you can give a smaller example for reproduction, you’ll have to try to debug the issue on your own, using either a step-by-step debugger or debugging output.

I don’t know why but the comments don’t post. But in my routes directory I have declared that go to the Comment Create method, and this is not working now. I don’t know why, because before, last 2 or 3 months approximately the api had worked out.

I don’t know what can I do to solve this issue, but I think that some of the structure of my controllers is bad, but I don’t know why yet.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.