Endpoint: ignore request body for GET or DELETE requests

Also extract the body parser into separate function for better
realibility.
Endpoint: move authentication check into separate method

To make the code more readable
add http.HttpError exception to make it easier to raise HTTP errors

This is very useful in cases where a low-level method wants to
interrupt the request flow and directly return the (usually error)
response to the user.