Trying to write a method to push a TX, I never programatically done a POST request, so I'm clearly messing somewhere bad.
According to the documentation from blockr, I'm supposed to do this:
To publish a transaction make a POST (!) request with your transaction hex to the push API.
Using curl this would be like (shell example):
curl -d '{"hex":"TX_HASH"}'
http://btc.blockr.io/api/v1/tx/pushI'm getting 500 errors left and right.
I'm doing this on C#, could someone help?
Post("http://btc.blockr.io/api/v1/tx/push", "hex", HexString);
public static void Post(string RequestURL, string Post1, string Post2)
{
using (var wb = new WebClient())
{
var data = new NameValueCollection();
data[Post1] = Post2;
var response = wb.UploadValues(RequestURL, "POST", data);
}
}