string requestUri = "<http://www.example.com>";
string requestBodyString = "Request body string.";
string contentType = "text/plain";
string requestMethod = "POST";
    
byte[] responseBody;    
byte[] requestBodyBytes = Encoding.UTF8.GetBytes(requestBodyString);

using (var client = new WebClient())
{
    client.Headers[HttpRequestHeader.ContentType] = contentType;
    responseBody = client.UploadData(requestUri, requestMethod, requestBodyBytes);
}