Пример #1
0
 public RequestAddQuestion(FormAddQuestion formAddQuestion)
 {
     Endpoint    = "/questions";
     ContentBody = new StringContent(
         JsonConvert.SerializeObject(formAddQuestion));
     ContentBody.Headers.ContentType
         = MediaTypeHeaderValue.Parse("application/json");
 }
Пример #2
0
 public async Task CreateQuestionAsync(FormAddQuestion formAddQuestion)
 => await _context.HttpPostAsync <ResponseBase>(new RequestAddQuestion(formAddQuestion));
Пример #3
0
 public Task AddNewQuestionAsync(FormAddQuestion formAddQuestion)
 => _context.CreateQuestionAsync(formAddQuestion);