HttpClientUtils.cs 434 B

12345678910111213141516171819
  1. #if ENABLE_MONO && (DEVELOPMENT_BUILD || UNITY_EDITOR)
  2. using System.Net.Http;
  3. namespace SingularityGroup.HotReload {
  4. public class HttpClientUtils {
  5. public static HttpClient CreateHttpClient() {
  6. var handler = new HttpClientHandler {
  7. // Without this flag HttpClients don't work for PCs with double-byte characters in the name
  8. UseCookies = false
  9. };
  10. return new HttpClient(handler);
  11. }
  12. }
  13. }
  14. #endif