I'm trying to abstract out some HttpClient calls (.get(...) and .post(...)) into a BaseService class since I'm having to duplicate code such as headers and credentials if my services don't inherit from a base class.
In doing this, for some reason my code isn't choosing the generic overload on the get.
The following method call is successfully choosing the correct HttpClient.get(...) overload:
However, the following is choosing a different overload, and I have no idea how to fix it:
Is this because I'm declaring the private options field incorrectly? I can't find in the API docs a better/correct way of declaring it so that the correct overload will be chosen successfully. Can someone please help me make my code choose the correct (generic Observable<T>
) overload for HttpClient.get(...)?