string Data = "{" +
" \"request\": { " +
" \"header\": { " +
" \"username\": \"YourUserName\"," +
" \"password\": \"YourPassword\" " +
"}," +
" \"body\": {" +
" \"shape\": \"round\" " +
"}" +
"}" +
"}";
string URL =
"https://technet.rapaport.com/HTTP/JSON/Prices/GetPriceSheet.aspx ";
WebRequest webRequest =
WebRequest.Create(URL);
webRequest.Method =
"POST";
webRequest.ContentType =
"application/x-www-form-urlencoded";
Stream reqStream = webRequest.GetRequestStream();
string postData = Data;
byte[] postArray =
Encoding.ASCII.GetBytes(postData);
reqStream.Write(postArray, 0, postArray.Length);
reqStream.Close();
StreamReader sr =
new
StreamReader(webRequest.GetResponse().GetResponseStream());
string Result = sr.ReadToEnd();