Section99.1:CreatingandsendinganHTTPPOSTrequest usingSystem.Net; usingSystem.IO; ... stringrequestUrl="https://www.example.com/submit.html"; HttpWebRequestrequest=HttpWebRequest.CreateHttp(requestUrl); request.Method="POST"; //Optionally,setpropertiesoftheHttpWebRequest,suchas:request.AutomaticDecompression=DecompressionMethods.Deflate|DecompressionMethods.GZip; request.ContentType="application/x-www-form-urlencoded"; //CouldalsosetotherHTTPheaderssuchasRequest.UserAgent,Request.Referer, //Request.Accept,orotherheadersviatheRequest.Headerscollection. //SetthePOSTrequestbodydata.Inthisexample,thePOSTdataisin //application/x-www-form-urlencodedformat. stringpostData="myparam1=myvalue1&myparam2=myvalue2"; using(varwriter=newStreamWriter(request.GetRequestStream())) { writer.Write(postData); } //Submittherequest,andgettheresponsebodyfromtheremoteserver. stringresponseFromRemoteServer; using(HttpWebResponseresponse=(HttpWebResponse)request.GetResponse()) { using(StreamReaderreader=newStreamReader(response.GetResponseStream()))…