private async Task <(HttpStatusCode status, string content)> PostDocAsync(Document document) { var jsonContent = JsonConvert.SerializeObject(document); using (var client = TestServerHelper.CreateClient()) using (var response = await client.PostAsync("api/docs", new StringContent(jsonContent, Encoding.UTF8, "application/json"))) { return(response.StatusCode, await response.Content.ReadAsStringAsync()); } }