from curl manual page
-u, --user <user:password> - user credentials-d, --data <data> - POST data
so you can "decode" it like:
using (var wc = new System.Net.WebClient()) { // data string parameters = string.Concat("description=", description, "&card[number]=" , cardNumber, "&card[exp_month]=", cardExpirationMonth, "&card[exp_year]=", cardExpirationYear), url = "https://api.stripe.com/v1/customers; // let fake it and make it was a browser requesting the data wc.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)"); // credentials wc.Credentials = new System.Net.NetworkCredential("*private key here*", ""); // make it a POST instead of a GET wc.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded"; // send and get answer in a string string result = wc.UploadString(url, parameters); }
updated by setting the POST from an existing response .
source share