예제 #1
0
        public async Task <GetAssessmentResponse> GetAssessment(string sessionId)
        {
            var url = $"{httpClient.BaseAddress}/assessment/{sessionId}/reload";
            var httpResponseMessage = await httpClient.GetAsync(url).ConfigureAwait(false);

            httpResponseMessage.EnsureSuccessStatusCode();
            var contentResponse = await httpResponseMessage.Content.ReadAsStringAsync().ConfigureAwait(false);

            var response = serialiser.Deserialise <GetAssessmentResponse>(contentResponse);

            getAssessmentResponseDataProcessor.Processor(response);
            return(response);
        }
예제 #2
0
        public async Task <GetQuestionResponse> GetQuestion(string sessionId, string assessmentType, int questionNumber)
        {
            var url = $"{httpClient.BaseAddress}/assessment/{sessionId}/{assessmentType}/q/{questionNumber}";
            var httpResponseMessage = await httpClient.GetAsync(url).ConfigureAwait(false);

            httpResponseMessage.EnsureSuccessStatusCode();
            var contentResponse = await httpResponseMessage.Content.ReadAsStringAsync().ConfigureAwait(false);

            var response = serialiser.Deserialise <GetQuestionResponse>(contentResponse);

            getQuestionResponseDataProcessor.Processor(response);
            return(response);
        }