Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 56 for Constructor (0.25 sec)

  1. okhttp/src/main/kotlin/okhttp3/Cache.kt

     *
     * [rfc_7234]: http://tools.ietf.org/html/rfc7234
     */
    class Cache internal constructor(
      directory: Path,
      maxSize: Long,
      fileSystem: FileSystem,
      taskRunner: TaskRunner,
    ) : Closeable, Flushable {
      /** Create a cache of at most [maxSize] bytes in [directory]. */
      constructor(
        fileSystem: FileSystem,
        directory: Path,
        maxSize: Long,
      ) : this(
        directory,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/Request.kt

        /** A mutable map of tags, or an immutable empty map if we don't have any. */
        internal var tags = mapOf<KClass<*>, Any>()
    
        constructor() {
          this.method = "GET"
          this.headers = Headers.Builder()
        }
    
        internal constructor(request: Request) {
          this.url = request.url
          this.method = request.method
          this.body = request.body
          this.tags =
            when {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:17:44 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  3. okhttp-logging-interceptor/README.md

    OkHttpClient client = new OkHttpClient.Builder()
      .addInterceptor(logging)
      .build();
    ```
    
    You can change the log level at any time by calling `setLevel()`.
    
    To log to a custom location, pass a `Logger` instance to the constructor.
    ```java
    HttpLoggingInterceptor logging = new HttpLoggingInterceptor(new Logger() {
      @Override public void log(String message) {
        Timber.tag("OkHttp").d(message);
      }
    });
    ```
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 1.3K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/Response.kt

        internal var receivedResponseAtMillis: Long = 0
        internal var exchange: Exchange? = null
        internal var trailersFn: (() -> Headers) = { Headers.headersOf() }
    
        constructor() {
          headers = Headers.Builder()
        }
    
        internal constructor(response: Response) {
          this.request = response.request
          this.protocol = response.protocol
          this.code = response.code
          this.message = response.message
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/platform/BouncyCastlePlatform.kt

    /**
     * Platform using BouncyCastle if installed as the first Security Provider.
     *
     * Requires org.bouncycastle:bctls-jdk15on on the classpath.
     */
    class BouncyCastlePlatform private constructor() : Platform() {
      private val provider: Provider = BouncyCastleJsseProvider()
    
      override fun newSSLContext(): SSLContext = SSLContext.getInstance("TLS", provider)
    
      override fun platformTrustManager(): X509TrustManager {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/MultipartReader.kt

     * [close].
     *
     * [rfc_2046]: http://www.ietf.org/rfc/rfc2046.txt
     */
    class MultipartReader
      @Throws(IOException::class)
      constructor(
        private val source: BufferedSource,
        @get:JvmName("boundary") val boundary: String,
      ) : Closeable {
        /** This delimiter typically precedes the first part. */
        private val dashDashBoundary =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/io/FaultyFileSystem.kt

    import java.io.IOException
    import okio.Buffer
    import okio.FileSystem
    import okio.ForwardingFileSystem
    import okio.ForwardingSink
    import okio.Path
    import okio.Sink
    
    class FaultyFileSystem constructor(delegate: FileSystem?) : ForwardingFileSystem(delegate!!) {
      private val writeFaults: MutableSet<Path> = LinkedHashSet()
      private val deleteFaults: MutableSet<Path> = LinkedHashSet()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  8. mockwebserver-junit5/README.md

        ...
      }
    }
    ```
    
    Alternately you may add the [MockWebServer] as a constructor parameter:
    
    ```
    class MyTest {
      private final MockWebServer server;
    
      MyTest(MockWebServer server) {
        this.server = server;
      }
    
      @Test
      void test() {
        ...
      }
    }
    ```
    
    Constructor injection is particularly concise in Kotlin:
    
    ```
    class MyTest(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 1.3K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/platform/OpenJSSEPlatform.kt

    /**
     * Platform using OpenJSSE (https://github.com/openjsse/openjsse) if installed as the first
     * Security Provider.
     *
     * Requires org.openjsse:openjsse >= 1.1.0 on the classpath.
     */
    class OpenJSSEPlatform private constructor() : Platform() {
      private val provider: Provider = org.openjsse.net.ssl.OpenJSSE()
    
      // Selects TLSv1.3 so we are specific about our intended version ranges (not just 1.3)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  10. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/LoggingEventListener.kt

     * The format of the logs created by this class should not be considered stable and may change
     * slightly between releases. If you need a stable logging format, use your own event listener.
     */
    class LoggingEventListener private constructor(
      private val logger: HttpLoggingInterceptor.Logger,
    ) : EventListener() {
      private var startNs: Long = 0
    
      override fun callStart(call: Call) {
        startNs = System.nanoTime()
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 11:07:32 GMT 2024
    - 5.4K bytes
    - Viewed (0)
Back to top