public RequestAddQuestion(FormAddQuestion formAddQuestion) { Endpoint = "/questions"; ContentBody = new StringContent( JsonConvert.SerializeObject(formAddQuestion)); ContentBody.Headers.ContentType = MediaTypeHeaderValue.Parse("application/json"); }
public async Task CreateQuestionAsync(FormAddQuestion formAddQuestion) => await _context.HttpPostAsync <ResponseBase>(new RequestAddQuestion(formAddQuestion));
public Task AddNewQuestionAsync(FormAddQuestion formAddQuestion) => _context.CreateQuestionAsync(formAddQuestion);