Created
January 3, 2015 14:08
-
-
Save jamesaxl/16e817c58bb7e523ff35 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var values = new System.Collections.Specialized.NameValueCollection(); | |
values["code"] = content; | |
values["lexer"] = language; | |
values["expiry"] = expiry; | |
System.Net.ServicePointManager.ServerCertificateValidationCallback = delegate { return true; }; | |
Session.Headers.Add("Content-Type", "application/x-www-form-urlencoded"); | |
var message = Session.UploadValues("https://bpaste.net/", "POST", values); | |
var url = System.Text.Encoding.Default.GetString(message); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment