public static void GetPassengers() { TicketService service = new TicketService(StaticValues.MyCookies); GetPassengerDTOsResponseInfo ri = service.GetMyPassengers(); StaticValues.PassengerList = ri.data.normal_passengers; }
public GetPassengerDTOsResponseInfo GetMyPassengers() { HttpClient client = new HttpClient(Cookies); if (StaticValues.Proxy != "") { client.Proxy = new WebProxy(StaticValues.Proxy); } string url = "https://kyfw.12306.cn/otn/confirmPassenger/getPassengerDTOs"; string result = client.Get(url); if (result != "") { GetPassengerDTOsResponseInfo ri = JsonHelper.JsonDeserialize <GetPassengerDTOsResponseInfo>(result); return(ri); } else { return(null); } }