If this is the code you're using then straight away the HTTP request isn't going to work because you're returning from the method before it can even run:
If you get rid of the
statement then the request can process. Otherwise, have you tried also subscribing to the
to handle when errors happen? Using the catch()
] method can provide you a means to report errors.
Also, be aware some websites have origin restrictions for requests, so if you're running this locally or from another website then the request could be blocked for not originating from the same domain.