Call third party webapi from plugin using secure/ unsecure configuration

Here is the code how to call third party web api.