Gets a typed object from an endpoint Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise