Exemplo n.º 1
0
        public async Task MakeRequestAsync(string postcode)
        {
            //make a request
            PostcodeResponse = await CallManager.MakePostcodeRequestAsync(postcode, "postcode");

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

            //Use DTO to covert JSON string to an object
            SinglePostcodeDTO.DeserializeResponse(PostcodeResponse);
        }
        // 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);
        }
Exemplo n.º 3
0
        public async Task MakeRequestAsync(string postcode)
        {
            PostcodeSelected = postcode;

            // Make request
            PostcodeResponse = await CallManager.MakePostcodeRequestAsync(postcode);

            // Parse JSON response content
            JSON_Response = JObject.Parse(PostcodeResponse);

            // Use DTO to convert JSON string to an object
            SinglePostcodeDTO.DeserialiseResponse(PostcodeResponse);
        }