Aqueduct.ServerDensity.RequestClient.Post C# (CSharp) Method

Post() public method

public Post ( string url, string postBody ) : string
url string
postBody string
return string
        public string Post(string url, string postBody)
        {
            Logger.Debug("Sending Request to url: " + url);
            using (WebClient client = Create())
            {
                client.Headers["Content-type"] = "application/x-www-form-urlencoded";

                var postValue = Encoding.UTF8.GetBytes(postBody);
                byte[] result = new byte[0];
                result = client.UploadData(url, "POST", postValue);

                return Encoding.UTF8.GetString(result);
            }
        }
    }