REST API DESIGN – Getting a resource through REST with different parameters but same url pattern

In my experience, GET /users/{id} GET /users/email/{email} is the most common approach. I would also expect the methods to return a 404 Not Found if a user doesn’t exist with the provided id or email. I wouldn’t be surprised to see GET /users/id/{id}, either (though in my opinion, it is redundant). Comments on the other … Read more

What is the difference between grpc and websocket? Which one is more suitable for bidirectional streaming connection?

gRPC is not really the relevant part for comparison, it’s that gRPC uses HTTP/2 which can certainly be compared to WebSockets. https://www.infoq.com/articles/websocket-and-http2-coexist This article outlines them quite well. Essentially, HTTP/2 is Client/Server with Server Push on the background, so you can make your request and simply stay on that connection listening for updates without the … Read more

RESTful password reset

Unauthenticated users We do a PUT request on a api/v1/account/password endpoint and require a parameter with the corresponding account email to identify the account for which the user wants to reset (update) the password: PUT : /api/v1/account/password?email={email@example.com} Note: As @DougDomeny mentioned in his comment passing the email as a query string in the url is … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)