Class ObsoleteUrlFactory

  • All Implemented Interfaces:
    Cloneable, URLStreamHandlerFactory

    public final class ObsoleteUrlFactory
    extends Object
    implements URLStreamHandlerFactory, Cloneable
    OkHttp 3.14 dropped support for the long-deprecated OkUrlFactory class, which allows you to use the HttpURLConnection API with OkHttp's implementation. This class does the same thing using only public APIs in OkHttp. It requires OkHttp 3.14 or newer.

    Rather than pasting this 1100 line gist into your source code, please upgrade to OkHttp's request/response API. Your code will be shorter, easier to read, and you'll be able to use interceptors.

    • Constructor Detail

      • ObsoleteUrlFactory

        public ObsoleteUrlFactory​(okhttp3.OkHttpClient client)
        Instantiates a new Obsolete url factory.
        client - the client