I'm trying to request the balance from https://blockchain.info/. Following instructions https://github.com/blockchain/service-my-wallet-v3#installation I've installed node.js and npm and successfully started the server. Now I'm trying to request the balance of my wallet:
string responseString;
string urlRequest = "http://127.0.0.1:3000/api/v2/create";
var request = (HttpWebRequest)WebRequest.Create(urlRequest);
request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded";
string requestData = "password=PASS&api_code=CODE";
byte[] dataStream = Encoding.UTF8.GetBytes(requestData);
request.ContentLength = dataStream.Length;
Stream newStream = request.GetRequestStream();
newStream.Write(dataStream, 0, dataStream.Length);
newStream.Close();
var response = (HttpWebResponse)request.GetResponse();
responseString = new StreamReader(response.GetResponseStream()).ReadToEnd();
Console.WriteLine(responseString);
return responseString;
But I get response 500 and in node.js command prompt written "Error generating the entropyReferenceError: XMLHttpRequest is not defined.