Spring Boot ResponseEntity Http status codes vs json response

preview_player
Показать описание
Enjoy! :-)
Thank you for commenting and asking questions.

Library sign up referral link:

Checkout or buy the Introduction to Algorithms book at Amazon:

The code is located here:
Follow me on twitter:
Support me on Patreon:

As an Amazon Associate I earn from qualifying purchases.
Check out the stuff that I like (always updated):
Рекомендации по теме
Комментарии
Автор

It's good to use status codes for instances where the user is trying to gain unauthorized access. It's best not to give the attacker any hints. :)

kenocvr
Автор

thanks for the video. simple yet concise !

omariondumetion
Автор

Was just looking into this. Most tutorials just straight up return plain objects(like, for example GET would return Fruit rather than ResponseEntity<Fruit>) and I got scolded at work for doing this when building some simple rest api I had to do. Thanks.

Do you have any vid on how to properly use DTOs? I don't quite see their utility

livb
Автор

What do you think about HATEOAS? I do not see it being used very often, but i understand that this is the "true" RESTful. Thanks.

georgenicolae
Автор

In your opinion, is providing both a specific HTTP status code and returning a response body an "overkill"?

Korekt
Автор

Kinda unrelated to the video but when you have to return several entities is it better to return it as a List or an Iterator?

livb