Esempio n. 1
0
        protected async override Task <object> OnPerform()
        {
            var content = new StringContent(JsonConvert.SerializeObject(_fNGTRContract)
                                            , Encoding.UTF8, ApplicationJSON);
            var response = await _restClient.FNGTR(content);

            var data = await response.Content.ReadAsStringAsync();

            switch (response.StatusCode)
            {
            case HttpStatusCode.OK:
                var siteValidateContract = new DeSerializer().MapSiteValidate(data);
                return(new Mapper().MapSiteValidate(siteValidateContract));

            default:
                return(await HandleExceptions(response));
            }
        }