Answers for "How to post request C# with returning responsebody"

C#
0

How to post request C# with returning responsebody

using(WebClient client = new WebClient())
{
    var reqparm = new System.Collections.Specialized.NameValueCollection();
    reqparm.Add("param1", "<any> kinds & of = ? strings");
    reqparm.Add("param2", "escaping is already handled");
    byte[] responsebytes = client.UploadValues("http://localhost", "POST", reqparm);
    string responsebody = Encoding.UTF8.GetString(responsebytes);
}
Posted by: Guest on November-05-2021

Code answers related to "How to post request C# with returning responsebody"

C# Answers by Framework

Browse Popular Code Answers by Language