コード例 #1
0
        public string PostXMLString(String url, object request)
        {
            HttpClient          httpClient          = new HttpClient();
            var                 xml                 = XmlBuilder.SerializeToXMLString(request);
            HttpResponseMessage httpResponseMessage = httpClient.PostAsync(url, xml).Result;
            var                 a = httpResponseMessage.Content.ReadAsStringAsync().Result;

            return(a);
        }
コード例 #2
0
        public string PostXMLString(String url, object request)
        {
            ServicePointManager.Expect100Continue = true;
            ServicePointManager.SecurityProtocol  = SecurityProtocolType.Tls12;
            HttpClient          httpClient          = new HttpClient();
            var                 xml                 = XmlBuilder.SerializeToXMLString(request);
            HttpResponseMessage httpResponseMessage = httpClient.PostAsync(url, xml).Result;
            var                 a = httpResponseMessage.Content.ReadAsStringAsync().Result;

            return(a);
        }