spring boot - Avoiding the SPAM while sending a specific request using Java or SpringBoot - Stack Overflow

just a quick question in order to get some idea of what are the standards and what can be implemented.

just a quick question in order to get some idea of what are the standards and what can be implemented.

AS-IS: I have a webpage with a button. When I click on a button a request gets sent : A POST request and I return a json with a message : Request sent

If I click again the button I send the request again.

TODO : I click on the button and the request gets sent. the json shows me : Request sent If I click again I get a 429 not a 200 and the json says : You already did the request please wait 5 minutes.

My question is :

Is there any any spam standard method to do so or I just have to come up with my own fix like implementing some ConcurrentHashMap or use cache or check the time and based on that return a different http response with a different body ?

Hope the question makes sense.

Thx in advance for all the ideas and help.

Wish you a good day.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745516435a4631025.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信