質問

私は、GETやPOSTリクエストで、オンラインAPIを使用するプログラムを開発したい、と私は(ウェブページを見て、ユーザなし)プログラム内のリクエストを作成する方法を知っているし、その後に結果をダウンロードしたいですプログラムはので、私はそれらを解析することができます。

役に立ちましたか?

解決

あなたは WebRequest クラス。この例では、MSDNのドキュメントから採用されています:

Dim request As WebRequest = WebRequest.Create("http://www.example.com/example.html")
' Get the response.
Dim response As HttpWebResponse = CType(request.GetResponse(), HttpWebResponse)
' Get the stream containing content returned by the server.
Dim dataStream As Stream = response.GetResponseStream()
' Open the stream using a StreamReader for easy access.
Dim reader As New StreamReader(dataStream)
' Read the content.
Dim responseFromServer As String = reader.ReadToEnd()
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top