Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var httpWebRequest = WebRequest.Create("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
- httpWebRequest.ContentType = "application/json";
- httpWebRequest.Method = "POST";
- using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
- {
- string json = "{ 'nl': { 'NL': '" + numeroLogico + "', 'CPF_CNPJ': '" + cnpj.Trim() + "', 'Bandeiras': [" + bandeiras + "], 'InativarBandeira': '" + inativarBandeiras + "', 'InativarLogico': '" + inativarLogico + "' } }";
- string jsonFinal = json.Replace("'", """);
- streamWriter.Write(json);
- streamWriter.Flush();
- streamWriter.Close();
- }
- var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
- ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement