byte[] authBytes = Encoding.UTF8.GetBytes((userName + ":" + password).ToCharArray());
request.Headers["Authorization"] = "Basic " + Convert.ToBase64String(authBytes);
byte[] reqBodyBytes = Encoding.UTF8.GetBytes(paramStr);
Stream reqStream = request.GetRequestStream();
reqStream.Write(reqBodyBytes, 0, reqBodyBytes.Length);
reqStream.Close();
求大神解答这段代码用asp要怎么做到哦?感激不尽 |