private void AddHeaders(HttpWebRequest req) { lock (headers) { headers.ForEach((h) => { if (h.Key == "Content-Length") { return; } if (reservedHeaders.Contains(h.Key)) { ReflectionTool.SetValue(req, h.Key.Replace("-", ""), h.Value); } else { req.Headers.Add(h.Key, h.Value); } }); } }