Post with parameters using HttpWebRequest in C# -
having following code: var request = httpwebrequest.create("https://api.channeladvisor.com/oauth2/token"); request.contenttype = "text/html"; request.method = "post"; request.headers.add("cache-control","no-cache"); request.headers.add("authorization", "basic " + base64translator.tobase64(system.text.encoding.ascii, devkey+":"+sharedsecret)); string postdata = " grant_type=refresh_token&refresh_token=a12sl1bhhjwerxm2nfth2efzw0yiw7462kahr43ucja"; var data = encoding.ascii.getbytes(postdata); request.contentlength = data.length; using (var stream = request.getrequeststream()) { stream.write(data, 0, data.length); } var response = (httpwebresponse)request.getresponse(); var responsestring ...