Esempio n. 1
0
        public async Task <Result <CarInfo> > GetCarInfoAsync(string carTagId)
        {
            FormUrlEncodedContent content = new FormUrlEncodedContentBuilder()
                                            .Add("CarTagId", carTagId)
                                            .Build();

            HttpClient          client  = NetUtils.Instance();
            HttpResponseMessage respone = await client.PostAsync(NetURL.URL_CAR_INFO, content);

            ResponseResult result  = NetUtils.ExplainHttpResponce(respone);
            CarInfo        carInfo = null;

            if (result.StateCode == 200)
            {
                carInfo = CarInfo.InstanceFormJson(result.Data);
            }
            return(Result <CarInfo> .FromResponseResult(result, carInfo));
        }