Hot answers tagged

5

If you use a programming language which supports namespaces (and most popular OO languages do), it does not make any sense to add a certain suffix to every class of a library, when the suffix could be better placed in the namespace itself. That is simply redundant. In case, however, a certain suffix is necessary to distinguish between related classes inside ...


5

No. 402 is quite non-standard, but if it was used, it would be used if a payment was required to connect to the server, and you couldn't connect to the server because you didn't pay for access to the server. In your situation, you can access the server. You do get the information from the server that you want. There is no error. This is a plain status 200. ...


3

It's a stretch to call gRPC communication an “anti-pattern”. Synchronous communication has the tremendous advantage of simplicity, whereas asynchronous communication is more flexible. Do you really need that flexibility, though? Event-based models for asynchronous operations Asynchronous communication means thinking in terms of events rather in terms of ...


2

Sure, this is OK if you document it appropriately. But this might not be a good idea, and HTTP/2 makes such considerations largely unnecessary. Bulk operations differ fundamentally from individual operations when you considers how errors shall be managed. For example, consider two objects A and B, though the client is not authorized to access object B. If we ...


1

One option would be to use the same endpoint, but use HTTP PUT to update the entire model and use PATCH to update one or more individual fields.


1

There is no one answer for this question. It really depends on how the underlying object changes, what kind of business rules or process you have around the change, etc etc etc.


1

I would do it the following way: ... Steps until client sends Token ID to the backend stays the same. Lookup the data on google. Check for that email in the database: 2.1 if user is not yet in the database, create him and return him 2.2 if user with that email is in the database, return him (step 2 is basically getOrCreateUser(googleData)) Create JWT ...


Only top voted, non community-wiki answers of a minimum length are eligible