Esempio n. 1
0
        public static string getOrderIssue(string orderNum)
        {
            string user     = Config.GetConfig("CtripUser");
            string password = Config.GetConfig("CtripPassword");
            string url      = Config.GetConfig("IssueBillInfoUrl");
            string data     = $"{{\"UserName\":\"{user}\",\"UserPassword\":\"{password}\",\"RequestBody\":{{\"IssueBillID\":{orderNum}}}}}";
            //string postData = JsonConvert.SerializeObject(data);
            string response = HttpUitls.Post(url, data, "");

            return(response);
        }
Esempio n. 2
0
        public void jsonWrite()
        {
            string tcUrl = "http://jpebook.ly.com/openapidoc/mock/5db25b80df1ddd0013cafc66";
            App    app   = new App()
            {
                app_id  = "mock",
                app_key = "mock"
            };
            string date = JObject.FromObject(app).ToString();

            Console.WriteLine("date:" + date);
            string toJson = HttpUitls.Post(tcUrl, date, "");

            Console.WriteLine("toJson:" + toJson);
        }