Geeks With Blogs
.Nettuce Code Salad August 2011 Entries
OAuth Signature Generator
public class OAuthSignatureGenerator { private const string OAuthConsumerKey = "oauth_consumer_key"; private const string OAuthNonce = "oauth_nonce"; private const string OAuthSignatureMethod = "oauth_signature_method"; private const string OAuthTimestamp = "oauth_timestamp"; private const string OAuthToken = "oauth_token"; private const string OAuthVersion = "oauth_version"; public enum SignatureMethod { Plaintext, HmacSha1 } public static string GenerateSignature(Uri uri, string httpMethod, string ......

Posted On Tuesday, August 16, 2011 3:11 PM

Return a NameValueCollection From A HTTP Header
public static NameValueCollection HeaderNameValueCollection(this string header) { var nameValueCollection = new NameValueCollection(); Regex.Matches(header, @"(\w+)="".*?""").Cast<M... => x.Value.TrimEnd('"').Split(... { "=\"" }, StringSplitOptions.None)).F... => nameValueCollection.Add(x[0], x.Length == 2 ? x[1] : string.Empty)); return nameValueCollection; } ......

Posted On Monday, August 15, 2011 10:12 PM

Copyright © Jon Canning | Powered by: GeeksWithBlogs.net