I have a device on my network that controls a p开发者_开发百科iece of hardware. I can control it with my browser like: http://xx.xx.xx.xxx/setvalue.html?Address_Value_Array={someValueToSendToDevice}
I do not need any form of a response from the device. I'm wondering what is the usual way to accomplish this sort of thing in c#. Thank you.
I would just use a System.Net.WebClient
:
using (System.Net.WebClient wc = new System.Net.WebClient())
{
wc.DownloadString("http://xx.xx.xx.xxx/setvalue.html?Address_Value_Array={someValueToSendToDevice}");
}
精彩评论