Exemplo n.º 1
0
        public async Task MakeRequest(string outcode)
        {
            OutcodeSelected = outcode;

            OutcodeResponse = await CallManager.MakeOutcodeRequestAsync(outcode);

            JsonResponse = JObject.Parse(OutcodeResponse);

            SingleOutcodeDTO.DeserealizeResponse(OutcodeResponse);
        }
        // method that defines and makes the API request, and stores the responses
        public async Task MakeRequestAsync(string outcode)
        {
            // set up the request
            OutcodeResponse = await CallManager.MakePostcodeRequestAsync(outcode, "outcode");

            //parse a json response
            Json_Response = JObject.Parse(OutcodeResponse);

            //Use DTO to covert JSON string to an object
            SingleOutcodeDTO.DeserializeResponse(OutcodeResponse);
        }