static void EnsureContentType(WebClient client) { var contentType = client.Headers["Content-Type"]; if(string.IsNullOrEmpty(contentType)) { contentType = "application/x-www-form-urlencoded"; } client.Headers["Content-Type"] = contentType; }