I have used the following code to call an API and pass in some parameters in the request header. Have a read here about the Encoding.GetEncoding(1252) . private static string ExecuteAPI(string url, Dictionary<string, string> parameters, string method = "POST", string body = " ", int timeOut = 180000) { var request = (HttpWebRequest)WebRequest.Create(url); request.Method = method; foreach (var param in parameters) { request.Headers.Add(param.Key, param.Value); } if ((method == "POST") || (method == "PUT")) { if (!string.IsNullOrEmpty(body)) { var requestBody = Encoding.UTF8.GetBytes(body); request.ContentLength = requestBody.Length; request.ContentType = "application/json"; using (var requestStream = request.GetRequestStream()) { requestStream.Write(requestBody, 0, requestBody.Lengt