Skip to content

Instantly share code, notes, and snippets.

@jonpryor
Created February 28, 2012 19:31
Show Gist options
  • Save jonpryor/1934585 to your computer and use it in GitHub Desktop.
Save jonpryor/1934585 to your computer and use it in GitHub Desktop.
using System;
using System.Net;
using System.Linq;
using System.Text;
class Test {
public static void Main ()
{
WebHeaderCollection headers = new WebHeaderCollection();
headers.Add("test1","test2");
Console.WriteLine("header bytes: {0}",
string.Join (" ", Encoding.UTF8.GetBytes(headers.ToString ()).Select (b => b.ToString ("x2"))));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment