ProgrammaticallyAddedProxyDetector.cs 522 B

12345678910111213141516
  1. #if !UNITY_WEBGL || UNITY_EDITOR
  2. using Best.HTTP.Shared;
  3. namespace Best.HTTP.Proxies.Autodetect
  4. {
  5. /// <summary>
  6. /// This one just returns with HTTPManager.Proxy,
  7. /// so when ProgrammaticallyAddedProxyDetector is used in the first place for the ProxyDetector,
  8. /// HTTPManager.Proxy gets the highest priority.
  9. /// </summary>
  10. public sealed class ProgrammaticallyAddedProxyDetector : IProxyDetector
  11. {
  12. Proxy IProxyDetector.GetProxy(HTTPRequest request) => HTTPManager.Proxy;
  13. }
  14. }
  15. #endif