ProgrammaticallyAddedProxyDetector.cs 525 B

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