Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 76 for to_string (0.14 sec)

  1. samples/slack/src/main/java/okhttp3/slack/SlackApi.java

        HttpUrl.Builder builder = baseUrl.newBuilder("/oauth/authorize")
            .addQueryParameter("client_id", clientId)
            .addQueryParameter("scope", scopes)
            .addQueryParameter("redirect_uri", redirectUrl.toString())
            .addQueryParameter("state", state.base64());
    
        if (team != null) {
          builder.addQueryParameter("team", team);
        }
    
        return builder.build();
      }
    
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Jul 06 19:30:55 GMT 2018
    - 4.4K bytes
    - Viewed (1)
  2. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingCookieJar.kt

      }
    
      fun takeResponseCookies(): List<Cookie> {
        return responseCookies.removeFirst()
      }
    
      fun assertResponseCookies(vararg cookies: String?) {
        assertThat(takeResponseCookies().map(Cookie::toString)).containsExactly(*cookies)
      }
    
      override fun saveFromResponse(
        url: HttpUrl,
        cookies: List<Cookie>,
      ) {
        responseCookies.add(cookies)
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  3. okhttp-android/build.gradle.kts

        }
      }
    
      compileOptions {
        targetCompatibility(JavaVersion.VERSION_11)
        sourceCompatibility(JavaVersion.VERSION_11)
      }
    
      kotlinOptions {
        jvmTarget = JavaVersion.VERSION_11.toString()
      }
    }
    
    dependencies {
      api(libs.squareup.okio)
      api(projects.okhttp)
      api(projects.loggingInterceptor)
      compileOnly(libs.androidx.annotation)
      compileOnly(libs.findbugs.jsr305)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 11:07:32 GMT 2024
    - 2K bytes
    - Viewed (0)
  4. samples/guide/src/main/java/okhttp3/recipes/PostStreaming.java

            }
          }
    
          private String factor(int n) {
            for (int i = 2; i < n; i++) {
              int x = n / i;
              if (x * i == n) return factor(x) + " × " + i;
            }
            return Integer.toString(n);
          }
        };
    
        Request request = new Request.Builder()
            .url("https://api.github.com/markdown/raw")
            .post(requestBody)
            .build();
    
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Jul 06 03:18:15 GMT 2018
    - 2.1K bytes
    - Viewed (0)
  5. samples/compare/src/test/kotlin/okhttp3/compare/ApacheHttpClientTest.kt

        val request = HttpGet(server.url("/").toUri())
        request.addHeader("Accept", "text/plain")
    
        httpClient.execute(request).use { response ->
          assertThat(response.code).isEqualTo(200)
          assertThat(EntityUtils.toString(response.entity)).isEqualTo("hello, Apache HttpClient 5.x")
        }
    
        val recorded = server.takeRequest()
        assertThat(recorded.headers["Accept"]).isEqualTo("text/plain")
    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)
  6. samples/static-server/src/main/java/okhttp3/sample/SampleServer.java

        }
        response.append("</body></html>");
    
        return new MockResponse()
            .setStatus("HTTP/1.1 200")
            .addHeader("content-type: text/html; charset=utf-8")
            .setBody(response.toString());
      }
    
      private MockResponse fileToResponse(String path, File file) throws IOException {
        return new MockResponse()
            .setStatus("HTTP/1.1 200")
            .setBody(fileToBytes(file))
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Jan 02 02:50:44 GMT 2019
    - 4.7K bytes
    - Viewed (0)
  7. samples/compare/src/test/kotlin/okhttp3/compare/JavaHttpClientTest.kt

            .build(),
        )
    
        val request =
          HttpRequest.newBuilder(server.url("/").toUri())
            .header("Accept", "text/plain")
            .build()
    
        val response = httpClient.send(request, BodyHandlers.ofString())
        assertThat(response.statusCode()).isEqualTo(200)
        assertThat(response.body()).isEqualTo("hello, Java 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
    - 2.7K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt

      fun openSocket(): Socket = Socket("localhost", port)
    
      @Synchronized override fun close() {
        executor.shutdown()
        socket?.closeQuietly()
        serverSocket?.closeQuietly()
      }
    
      override fun toString(): String = "MockHttp2Peer[$port]"
    
      private class OutFrame(
        val sequence: Int,
        val start: Long,
        val truncated: Boolean,
      )
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/CacheControlJvmTest.kt

          CacheControl.Builder()
            .maxAge(2, TimeUnit.DAYS)
            .build()
        assertThat(cacheControl.toString()).isEqualTo("max-age=172800")
        assertThat(cacheControl.toString()).isSameAs(cacheControl.toString())
      }
    
      @Test
      @Throws(Exception::class)
      fun timeDurationTruncatedToMaxValue() {
        val cacheControl =
          CacheControl.Builder()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  10. mockwebserver/src/test/java/mockwebserver3/RecordedRequestTest.kt

            localPort = 80,
          )
        val request = RecordedRequest("GET / HTTP/1.1", headers, emptyList(), 0, Buffer(), 0, socket)
        assertThat(request.requestUrl.toString()).isEqualTo("http://127.0.0.1/")
      }
    
      @Test fun testIpv6() {
        val socket =
          FakeSocket(
            localAddress =
              InetAddress.getByAddress(
                "::1",
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.1K bytes
    - Viewed (0)
Back to top