Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Basic 2010 HTTP POST Request

How can I send a POST HTTP request to a server (in Visual Basic 2010) and then receive the reply into a string.

like image 849
jSherz Avatar asked Feb 27 '23 01:02

jSherz


1 Answers

You can do this via HttpWebRequest. Just set the HttpWebRequest.Method to "POST".

For details, see the example on the MSDN page for HttpWebRequest.Method. The call to GetReponse will return a WebReponse which includes a Stream. You can then read the string information from the Stream using a StreamReader.

like image 160
Reed Copsey Avatar answered Mar 10 '23 22:03

Reed Copsey