B
B
BonBon Slick2021-03-17 23:09:29
Software design
BonBon Slick, 2021-03-17 23:09:29

Does it make sense to use PUT / PATCH if each request creates sub-entities of logging, statistics and others?

The user sent a request to update his profile, which is a PATCH request, but along the way, a record is created about where, by whom, when, where the request came from.
That is, every request, even GET is logged for each user, ip.

For example, a user can conditionally call GET URL 10 times a minute, it is unlikely that he will reload one page 10 times 10 times a minute just like that. Therefore, when a request arrives, an entity RequestLog (ip, url) is created, this is necessary to validate the limits and restrictions of the external, public api.
In fact, paid, long calculations and calculations can be carried out on a GET request.

Does it make sense to type or just use POST?
Why?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2021-03-18
@bacon

And what's the connection? Why is it possible to "just use POST" while "just use" PUT/PATCH causes any problems?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question