Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for OK (0.12 sec)

  1. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt

          /** No logs. */
          NONE,
    
          /**
           * Logs request and response lines.
           *
           * Example:
           * ```
           * --> POST /greeting http/1.1 (3-byte body)
           *
           * <-- 200 OK (22ms, 6-byte body)
           * ```
           */
          BASIC,
    
          /**
           * Logs request and response lines and their respective headers.
           *
           * Example:
           * ```
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 11.2K bytes
    - Viewed (1)
  2. okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt

        applicationLogs
          .assertLogEqual("--> GET $url")
          .assertLogMatch(Regex("""<-- 200 OK $url \(\d+ms, 0-byte body\)"""))
          .assertNoMoreLogs()
        networkLogs
          .assertLogEqual("--> GET $url http/1.1")
          .assertLogMatch(Regex("""<-- 200 OK $url \(\d+ms, 0-byte body\)"""))
          .assertNoMoreLogs()
      }
    
      @Test
      fun basicPost() {
        setLevel(Level.BASIC)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 37.6K bytes
    - Viewed (0)
  3. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

        assertThat(headersToList(response)).containsExactly("Content-Length: 0")
        assertThat(response.status).isEqualTo("HTTP/1.1 200 OK")
      }
    
      @Test
      fun setResponseMockReason() {
        val reasons =
          arrayOf(
            "Mock Response",
            "Informational",
            "OK",
            "Redirection",
            "Client Error",
            "Server Error",
            "Mock Response",
          )
        for (i in 0..599) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  4. mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt

    import okhttp3.internal.http2.Settings
    import okio.Buffer
    
    /** A scripted response to be replayed by the mock web server. */
    @ExperimentalOkHttpApi
    class MockResponse {
      /** Returns the HTTP response line, such as "HTTP/1.1 200 OK". */
      val status: String
    
      val code: Int
        get() {
          val statusParts = status.split(' ', limit = 3)
          require(statusParts.size >= 2) { "Unexpected status: $status" }
          return statusParts[1].toInt()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 13.3K bytes
    - Viewed (1)
  5. okhttp/src/main/kotlin/okhttp3/Cache.kt

         * Accept-Charset: UTF-8
         * HTTP/1.1 200 OK
         * 3
         * Content-Type: image/png
         * Content-Length: 100
         * Cache-Control: max-age=600
         * ```
         *
         * A typical HTTPS file looks like this:
         *
         * ```
         * https://google.com/foo
         * GET
         * 2
         * Accept-Language: fr-CA
         * Accept-Charset: UTF-8
         * HTTP/1.1 200 OK
         * 3
         * Content-Type: image/png
    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)
  6. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt

            tunnelCodec.readResponseHeaders(false)!!
              .request(nextRequest)
              .build()
          tunnelCodec.skipConnectBody(response)
    
          when (response.code) {
            HttpURLConnection.HTTP_OK -> return null
    
            HttpURLConnection.HTTP_PROXY_AUTH -> {
              nextRequest = route.address.proxyAuthenticator.authenticate(route, response)
                ?: throw IOException("Failed to authenticate with proxy")
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  7. okhttp-logging-interceptor/src/test/java/okhttp3/logging/LoggingEventListenerTest.kt

          .assertLogMatch(Regex("""requestHeadersEnd"""))
          .assertLogMatch(Regex("""responseHeadersStart"""))
          .assertLogMatch(Regex("""responseHeadersEnd: Response\{protocol=http/1\.1, code=200, message=OK, url=$url\}"""))
          .assertLogMatch(Regex("""responseBodyStart"""))
          .assertLogMatch(Regex("""responseBodyEnd: byteCount=6"""))
          .assertLogMatch(Regex("""connectionReleased"""))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheStrategy.kt

    import java.net.HttpURLConnection.HTTP_NOT_FOUND
    import java.net.HttpURLConnection.HTTP_NOT_IMPLEMENTED
    import java.net.HttpURLConnection.HTTP_NO_CONTENT
    import java.net.HttpURLConnection.HTTP_OK
    import java.net.HttpURLConnection.HTTP_REQ_TOO_LONG
    import java.util.Date
    import java.util.concurrent.TimeUnit.SECONDS
    import okhttp3.Request
    import okhttp3.Response
    import okhttp3.internal.http.HTTP_PERM_REDIRECT
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 12K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/internal/ws/RealWebSocketTest.kt

        ) {
          val url = "http://example.com/websocket"
          val response =
            Response.Builder()
              .code(101)
              .message("OK")
              .request(Request.Builder().url(url).build())
              .headers(responseHeaders!!)
              .protocol(Protocol.HTTP_1_1)
              .build()
          webSocket =
            RealWebSocket(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 01:59:58 GMT 2024
    - 18.5K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/DuplexTest.kt

        }
        body.awaitSuccess()
      }
    
      @Test
      fun clientReadsHeadersDataTrailers() {
        enableProtocol(Protocol.HTTP_2)
        val body =
          MockStreamHandler()
            .sendResponse("ok")
            .exhaustResponse()
        server.enqueue(
          MockResponse.Builder()
            .clearHeaders()
            .addHeader("h1", "v1")
            .addHeader("h2", "v2")
            .trailers(headersOf("trailers", "boom"))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 23.9K bytes
    - Viewed (0)
Back to top