Home > Mobile >  Calling an API get request, can't access the function
Calling an API get request, can't access the function

Time:12-24

I am trying to fetch API data using http client. I tried to follow this example enter image description here

CodePudding user response:

Actually the function you have defined in HttpManager is not a static function that is why you can not call that function without creating a object of that class so you need to call the function like below

HttpManager().getCharacters();
  • Related