Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 30 for Tage (0.16 sec)

  1. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

        assertThat(readAscii(response.body.byteStream(), Int.MAX_VALUE))
          .isEqualTo("This page has moved!")
      }
    
      @Test
      fun notRedirectedFromHttpToHttps() {
        server.enqueue(
          MockResponse(
            code = HttpURLConnection.HTTP_MOVED_TEMP,
            headers = headersOf("Location", "https://anyhost/foo"),
            body = "This page has moved!",
          ),
        )
        client =
          client.newBuilder()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  2. samples/slack/src/main/java/okhttp3/slack/SlackApi.java

     * instance of this class may operate without a user, or on behalf of many users. Use the Slack API
     * dashboard to create a client ID and secret for this application.
     *
     * <p>You must configure your Slack API OAuth and Permissions page with a localhost URL like {@code
     * http://localhost:53203/oauth/}, passing the same port to this class’ constructor.
     */
    public final class SlackApi {
      private final HttpUrl baseUrl = HttpUrl.get("https://slack.com/api/");
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Jul 06 19:30:55 GMT 2018
    - 4.4K bytes
    - Viewed (1)
  3. okhttp/src/main/kotlin/okhttp3/internal/platform/Platform.kt

          }
    
          return Platform()
        }
    
        /**
         * Returns the concatenation of 8-bit, length prefixed protocol names.
         * http://tools.ietf.org/html/draft-agl-tls-nextprotoneg-04#page-4
         */
        fun concatLengthPrefixed(protocols: List<Protocol>): ByteArray {
          val result = Buffer()
          for (protocol in alpnProtocolNames(protocols)) {
            result.writeByte(protocol.length)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.8K bytes
    - Viewed (1)
  4. mockwebserver/README.md

                case "/v1/profile/info":
                    return new MockResponse().setResponseCode(200).setBody("{\\\"info\\\":{\\\"name\":\"Lucas Albuquerque\",\"age\":\"21\",\"gender\":\"male\"}}");
            }
            return new MockResponse().setResponseCode(404);
        }
    };
    server.setDispatcher(dispatcher);
    ```
    
    
    ### Download
    
    ```kotlin
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 5K bytes
    - Viewed (1)
  5. okhttp/src/test/java/okhttp3/CallTest.kt

        server.enqueue(
          MockResponse(
            code = HttpURLConnection.HTTP_MOVED_TEMP,
            headers = headersOf("Location", "/page2"),
            body = "This page has moved!",
          ),
        )
        server.enqueue(MockResponse(body = "Page 2"))
        val response =
          client.newCall(
            Request(
              url = server.url("/page1"),
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 142.5K bytes
    - Viewed (0)
  6. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

      @Test
      fun redirect() {
        server.enqueue(
          MockResponse()
            .setResponseCode(HttpURLConnection.HTTP_MOVED_TEMP)
            .addHeader("Location: " + server.url("/new-path"))
            .setBody("This page has moved!"),
        )
        server.enqueue(MockResponse().setBody("This is the new location!"))
        val connection = server.url("/").toUrl().openConnection()
        val inputStream = connection.getInputStream()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/Cookie.kt

       *
       *  * **Embedded resources like images and iframes** in browsers use the context as the page in
       *    the address bar and the subject is the URL of an embedded resource.
       *
       *  * **Potentially-destructive navigations such as HTTP POST calls** use the context as the page
       *    originating the navigation, and the subject is the page being navigated to.
       *
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 04:12:05 GMT 2024
    - 23.1K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/CookieTest.kt

          .isEqualTo(2000L)
        assertThat(parseCookie(0L, url, "a=b; Expires=Thu, 01 Jan 1970 00:00:01 GMT; Max-Age=2")!!.expiresAt)
          .isEqualTo(2000L)
      }
    
      /** If a cookie incorrectly defines multiple 'Max-Age' attributes, the last one defined wins.  */
      @Test fun lastMaxAgeWins() {
        assertThat(parseCookie(0L, url, "a=b; Max-Age=2; Max-Age=4; Max-Age=1; Max-Age=3")!!.expiresAt)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 24.3K bytes
    - Viewed (0)
  9. README.md

          .url(url)
          .post(body)
          .build();
      try (Response response = client.newCall(request).execute()) {
        return response.body().string();
      }
    }
    ```
    
    Further examples are on the [OkHttp Recipes page][recipes].
    
    
    Requirements
    ------------
    
    OkHttp works on Android 5.0+ (API level 21+) and Java 8+.
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 6.2K bytes
    - Viewed (0)
  10. docs/features/interceptors.md

      @Override public Response intercept(Interceptor.Chain chain) throws IOException {
        Response originalResponse = chain.proceed(chain.request());
        return originalResponse.newBuilder()
            .header("Cache-Control", "max-age=60")
            .build();
      }
    };
    ```
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 8.1K bytes
    - Viewed (0)
Back to top