How to make HTTP requests with fetch and TypeScript