Vb.net 使用Api/读取Api返回值
Im使用来自SMS提供商的apiVb.net 使用Api/读取Api返回值,vb.net,api,sms,Vb.net,Api,Sms,Im使用来自SMS提供商的api Dim url As String url = "http://weburl.jsp?usr=abc&pass=def&msisdn=95786123384645&sid=ABC&msg=welcome&mt=0" webbrowser1.navigate(url) 我从提供商处获得的url。有没有其他更好的方式使用api发送短信 还有一个用于balance的api,它返回balance。现在我想把这个天平放在标签上。如
Dim url As String
url = "http://weburl.jsp?usr=abc&pass=def&msisdn=95786123384645&sid=ABC&msg=welcome&mt=0"
webbrowser1.navigate(url)
我从提供商处获得的url。有没有其他更好的方式使用api发送短信
还有一个用于balance的api,它返回balance。现在我想把这个天平放在标签上。如何做到这一点
http://weburl/CreditCheck.jsp?usr=abc&pass=def
上面的“复制粘贴”在浏览器上显示“平衡”,但我希望它位于标签中
我正在使用vb.net 2008 windows应用程序
提前感谢。您可以使用HttpWebRequest和HttpWebResponse,类似这样的
Dim sUrl As String = "http://weburl/CreditCheck.jsp?usr=abc&pass=def"
Dim wRequest As HttpWebRequest = DirectCast(System.Net.HttpWebRequest.Create(sUrl), HttpWebRequest)
wRequest.Proxy.Credentials = System.Net.CredentialCache.DefaultCredentials 'Not always needed
wRequest.Method = "GET"
Dim wResponse As HttpWebResponse = DirectCast(wRequest.GetResponse(), HttpWebResponse)
Dim sResponse As String = ""
Using srRead As New StreamReader(wResponse.GetResponseStream())
sResponse = srRead.ReadToEnd()
End Using
然后你需要解析结果以提取余额你能看看我的另一个qtn吗:没有人回答这个问题