Here is the code that calls an API. I am also using this method multiple times to call the same API, but passing different data each time, so not sure if that can be optimiz