You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
485 B

  1. using Microsoft.AspNetCore.TestHost;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Net.Http;
  5. using System.Text;
  6. namespace FunctionalTests.Extensions
  7. {
  8. static class HttpClientExtensions
  9. {
  10. public static HttpClient CreateIdempotentClient(this TestServer server)
  11. {
  12. var client = server.CreateClient();
  13. client.DefaultRequestHeaders.Add("x-requestid", Guid.NewGuid().ToString());
  14. return client;
  15. }
  16. }
  17. }