Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 257 for url (0.12 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/connection/FailedPlan.kt

     *
     *  * A DNS lookup failed
     *  * The configuration is incapable of carrying the request, such as when the client is configured
     *    to use `H2_PRIOR_KNOWLEDGE` but the URL's scheme is `https:`.
     *  * Preemptive proxy authentication failed.
     *
     * Planning failures are not necessarily fatal. For example, even if we can't DNS lookup the first
     * proxy in a list, looking up a subsequent one may succeed.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 1.5K bytes
    - Viewed (1)
  2. samples/guide/src/main/java/okhttp3/recipes/kt/CacheResponse.kt

              directory = cacheDirectory,
              // 1 MiB.
              maxSize = 10L * 1024L * 1024L,
            ),
          )
          .build()
    
      fun run() {
        val request =
          Request.Builder()
            .url("http://publicobject.com/helloworld.txt")
            .build()
    
        val response1Body =
          client.newCall(request).execute().use {
            if (!it.isSuccessful) throw IOException("Unexpected code $it")
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2K bytes
    - Viewed (2)
  3. samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/ClientAndServer.java

            .socketFactory(new UnixDomainSocketFactory(socketFile))
            .protocols(Collections.singletonList(Protocol.H2_PRIOR_KNOWLEDGE))
            .build();
    
        Request request = new Request.Builder()
            .url("http://publicobject.com/helloworld.txt")
            .build();
    
        try (Response response = client.newCall(request).execute()) {
          System.out.println(response.body().string());
        }
    
        server.shutdown();
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Dec 24 03:46:30 GMT 2018
    - 2.1K bytes
    - Viewed (0)
  4. okhttp-logging-interceptor/src/test/java/okhttp3/logging/LoggingEventListenerTest.kt

          .assertLogMatch(Regex("""cacheConditionalHit: Response\{protocol=h2, code=200, message=, url=$url\}"""))
          .assertLogMatch(Regex("""cacheHit: Response\{protocol=h2, code=200, message=, url=$url\}"""))
          .assertLogMatch(Regex("""cacheMiss"""))
          .assertLogMatch(Regex("""satisfactionFailure: Response\{protocol=h2, code=200, message=, url=$url\}"""))
          .assertNoMoreLogs()
      }
    
      private fun request(): Request.Builder {
    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)
  5. samples/slack/src/main/java/okhttp3/slack/SlackClient.java

      private OAuthSessionFactory sessionFactory;
    
      /** Guarded by this. */
      private OAuthSession session;
    
      public SlackClient(SlackApi slackApi) {
        this.slackApi = slackApi;
      }
    
      /** Shows a browser URL to authorize this app to act as this user. */
      public void requestOauthSession(String scopes, String team) throws Exception {
        if (sessionFactory == null) {
          sessionFactory = new OAuthSessionFactory(slackApi);
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 12 03:31:36 GMT 2019
    - 3.4K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/CookieTest.kt

        assertThat(parse(url, "ab=c\u0009d")).isNull()
        assertThat(parse(url, "a\u001fb=cd")).isNull()
        assertThat(parse(url, "ab=c\u001fd")).isNull()
        assertThat(parse(url, "a\u007fb=cd")).isNull()
        assertThat(parse(url, "ab=c\u007fd")).isNull()
        assertThat(parse(url, "a\u0080b=cd")).isNull()
        assertThat(parse(url, "ab=c\u0080d")).isNull()
        assertThat(parse(url, "a\u00ffb=cd")).isNull()
        assertThat(parse(url, "ab=c\u00ffd")).isNull()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 24.3K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/EventListenerTest.kt

            Request.Builder()
              .url(server.url("/"))
              .build(),
          )
        call.cancel()
        call.cancel()
        assertThat(listener.recordedEventTypes()).containsExactly("Canceled")
      }
    
      private fun assertSuccessfulEventOrder(responseMatcher: Matcher<Response?>?) {
        val call =
          client.newCall(
            Request.Builder()
              .url(server.url("/"))
              .build(),
          )
    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)
  8. samples/crawler/src/main/java/okhttp3/sample/Crawler.java

      }
    
      private void drainQueue() throws Exception {
        for (HttpUrl url; (url = queue.take()) != null; ) {
          if (!fetchedUrls.add(url)) {
            continue;
          }
    
          Thread currentThread = Thread.currentThread();
          String originalName = currentThread.getName();
          currentThread.setName("Crawler " + url);
          try {
            fetch(url);
          } catch (IOException e) {
    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)
  9. okhttp/src/test/java/okhttp3/ConnectionListenerTest.kt

      @ValueSource(booleans = [true, false])
      fun successfulCallEventSequence() {
        server!!.enqueue(MockResponse(body = "abc"))
        val call =
          client.newCall(
            Request.Builder()
              .url(server!!.url("/"))
              .build(),
          )
        val response = call.execute()
        assertThat(response.code).isEqualTo(200)
        assertThat(response.body.string()).isEqualTo("abc")
        response.body.close()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/CallKotlinTest.kt

        val endpointUrl = server.url("/endpoint")
    
        var request =
          Request.Builder()
            .url(endpointUrl)
            .header("Content-Type", "application/xml")
            .put(ValidRequestBody())
            .build()
        client.newCall(request).execute().use {
          assertEquals(201, it.code)
        }
    
        request =
          Request.Builder()
            .url(endpointUrl)
            .head()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 8.4K bytes
    - Viewed (0)
Back to top