Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 140 for Leider (0.21 sec)

  1. samples/guide/src/main/java/okhttp3/recipes/PreemptiveAuth.java

        }
    
        @Override public Response intercept(Chain chain) throws IOException {
          Request request = chain.request();
          if (request.url().host().equals(host)) {
            request = request.newBuilder()
                .header("Authorization", credentials)
                .build();
          }
          return chain.proceed(request);
        }
      }
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Nov 05 07:46:46 GMT 2018
    - 2.1K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/ws/MessageDeflater.kt

      private val noContextTakeover: Boolean,
    ) : Closeable {
      private val deflatedBytes = Buffer()
    
      private val deflater =
        Deflater(
          Deflater.DEFAULT_COMPRESSION,
          // nowrap (omits zlib header):
          true,
        )
    
      private val deflaterSink = DeflaterSink(deflatedBytes, deflater)
    
      /** Deflates [buffer] in place as described in RFC 7692 section 7.2.1. */
      @Throws(IOException::class)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  3. samples/compare/src/test/kotlin/okhttp3/compare/JettyHttpClientTest.kt

        client.stop()
      }
    
      @Test fun get(server: MockWebServer) {
        server.enqueue(MockResponse(body = "hello, Jetty HTTP Client"))
    
        val request =
          client.newRequest(server.url("/").toUri())
            .header("Accept", "text/plain")
        val response = request.send()
        assertThat(response.status).isEqualTo(200)
        assertThat(response.contentAsString).isEqualTo("hello, Jetty HTTP Client")
    
        val recorded = server.takeRequest()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

        val isHttps: Boolean = request.isHttps
        val url: HttpUrl = request.url
        val method: String = request.method
        val headers: Headers = request.headers
        val header: String? = request.header("")
        val headersForName: List<String> = request.headers("")
        val body: RequestBody? = request.body
        var stringTag: String? = request.tag(String::class)
        stringTag = request.tag<String>()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 46.5K bytes
    - Viewed (4)
  5. okhttp/src/main/kotlin/okhttp3/RequestBody.kt

    import okio.BufferedSink
    import okio.ByteString
    import okio.FileSystem
    import okio.GzipSink
    import okio.Path
    import okio.buffer
    import okio.source
    
    abstract class RequestBody {
      /** Returns the Content-Type header for this body. */
      abstract fun contentType(): MediaType?
    
      /**
       * Returns the number of bytes that will be written to sink in a call to [writeTo],
       * or -1 if that count is unknown.
       */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Jan 25 14:41:37 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/FormBody.kt

       * do double-duty to make sure the counting and content are consistent, particularly when it comes
       * to awkward operations like measuring the encoded length of header strings, or the
       * length-in-digits of an encoded integer.
       */
      private fun writeOrCountBytes(
        sink: BufferedSink?,
        countBytes: Boolean,
      ): Long {
        var byteCount = 0L
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  7. samples/crawler/src/main/java/okhttp3/sample/Crawler.java

              + ")") : "(cache)";
          int responseCode = response.code();
    
          System.out.printf("%03d: %s %s%n", responseCode, url, responseSource);
    
          String contentType = response.header("Content-Type");
          if (responseCode != 200 || contentType == null) {
            return;
          }
    
          MediaType mediaType = MediaType.parse(contentType);
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Aug 12 07:26:27 GMT 2021
    - 4.6K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketProtocol.kt

     */
    package okhttp3.internal.ws
    
    import okio.Buffer
    import okio.ByteString.Companion.encodeUtf8
    
    object WebSocketProtocol {
      /** Magic value which must be appended to the key in a response header. */
      internal const val ACCEPT_MAGIC = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"
    
      /*
      Each frame starts with two bytes of data.
    
       0 1 2 3 4 5 6 7    0 1 2 3 4 5 6 7
      +-+-+-+-+-------+  +-+-------------+
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/HeadersJvmTest.kt

          Headers.Builder()
            .addUnsafeNonAscii("héader1", "value1")
            .build()
        }.also { expected ->
          assertThat(expected.message).isEqualTo("Unexpected char 0xe9 at 1 in header name: héader1")
        }
      }
    
      @Test fun addUnsafeNonAsciiAcceptsUnicodeValue() {
        val headers =
          Headers.Builder()
            .addUnsafeNonAscii("header1", "valué1")
            .build()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/EventListenerTest.kt

        responseBodyBytes: Matcher<Long?>?,
      ) {
        if (requestHeaderLength != null) {
          val responseHeadersEnd = listener.removeUpToEvent<RequestHeadersEnd>()
          MatcherAssert.assertThat(
            "request header length",
            responseHeadersEnd.headerLength,
            requestHeaderLength,
          )
        } else {
          assertThat(listener.recordedEventTypes())
            .doesNotContain("RequestHeadersEnd")
        }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 56.9K bytes
    - Viewed (0)
Back to top