Generally its BAD practice having the server call itself to login and I would very much recommend against it and to instead use the API.
In this case using the API would be recommended as you can probably directly integrate with the external app. But if you want to keep using the old code you can use the SendWebRequest function to send a post request. What function were you using to send the GET data?