コード例 #1
0
ファイル: RolloServ.cs プロジェクト: pgarcia03/contenedor
        public static async Task <List <RolloModel> > GetRollosXidContenedor_ancho(int idcontenedor)
        {
            HttpClient httpClient = new HttpClient();
            var        uri        = new UrlMain();
            string     url        = string.Concat(uri.UrlM, "rollos/ancho/?", "idcontenedor=", idcontenedor.ToString());

            var response = await httpClient.GetAsync(url).ConfigureAwait(false);

            if (response.StatusCode == System.Net.HttpStatusCode.OK)
            {
                var json = await response.Content.ReadAsStringAsync().ConfigureAwait(false);

                var rollos = RolloModel.FromJson(json);

                return(rollos);
            }
            return(null);
        }