05-16-2012 08:49 AM
This example should work for both HTTP and HTTPS. It's an adaption of Jarrod's code above.