Hello,
You can use something like below code snippet to achieve it.
WebClient webClient = new WebClient();
webClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(webClient_DownloadStringCompleted);
webClient.DownloadStringAsync(new System.Uri(YOUR_URL));
void webClient_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
{
if (e.Error == null)
{
updateSomething(e.result);
}
}
Here
YOUR_URL
will be "http://localhost/get_request.php?username=sops".
Regards,