Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 257 for url (0.13 sec)

  1. samples/guide/src/main/java/okhttp3/guide/PostExample.java

      final OkHttpClient client = new OkHttpClient();
    
      String post(String url, String json) throws IOException {
        RequestBody body = RequestBody.create(json, JSON);
        Request request = new Request.Builder()
            .url(url)
            .post(body)
            .build();
        try (Response response = client.newCall(request).execute()) {
          return response.body().string();
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 2K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/HeadersRequestTest.kt

        val headerBlock =
          headersOf(
            ":status",
            "200 OK",
            ":version",
            "HTTP/1.1",
            "connection",
            "close",
          )
        val request = Request.Builder().url("http://square.com/").build()
        val response = readHttp2HeadersList(headerBlock, Protocol.HTTP_2).request(request).build()
        val headers = response.headers
        assertThat(headers.size).isEqualTo(1)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  3. docs/features/calls.md

    If a conditional GET was successful, responses from the network and cache are merged as directed by the spec.
    
    ## Follow-up Requests
    
    When your requested URL has moved, the webserver will return a response code like `302` to indicate the document’s new URL. OkHttp will follow the redirect to retrieve a final response.
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 3.9K bytes
    - Viewed (0)
  4. samples/slack/src/main/java/okhttp3/slack/RtmStartResponse.java

     * limitations under the License.
     */
    package okhttp3.slack;
    
    import java.util.List;
    import okhttp3.HttpUrl;
    
    /** See https://api.slack.com/methods/rtm.start. */
    public final class RtmStartResponse {
      HttpUrl url;
      Object self;
      Object team;
      List<Object> users;
      List<Object> channels;
      List<Object> groups;
      List<Object> mpims;
      List<Object> ims;
      List<Object> bots;
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Oct 23 15:24:22 GMT 2016
    - 943 bytes
    - Viewed (0)
  5. samples/guide/src/main/java/okhttp3/recipes/kt/SynchronousGet.kt

    import java.io.IOException
    import okhttp3.OkHttpClient
    import okhttp3.Request
    
    class SynchronousGet {
      private val client = OkHttpClient()
    
      fun run() {
        val request =
          Request.Builder()
            .url("https://publicobject.com/helloworld.txt")
            .build()
    
        client.newCall(request).execute().use { response ->
          if (!response.isSuccessful) throw IOException("Unexpected code $response")
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.2K bytes
    - Viewed (0)
  6. samples/guide/src/main/java/okhttp3/recipes/CertificatePinning.java

                  .build())
          .build();
    
      public void run() throws Exception {
        Request request = new Request.Builder()
            .url("https://publicobject.com/robots.txt")
            .build();
    
        try (Response response = client.newCall(request).execute()) {
          if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
    
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 08 21:30:01 GMT 2019
    - 1.7K bytes
    - Viewed (0)
  7. native-image-tests/src/main/kotlin/okhttp3/PublicSuffixDatabaseTest.kt

    class PublicSuffixDatabaseTest {
      @RegisterExtension
      @JvmField
      val platform = PlatformRule()
    
      @Test
      fun testResourcesLoaded() {
        val url = "https://api.twitter.com".toHttpUrl()
    
        assertThat(url.topPrivateDomain()).isEqualTo("twitter.com")
      }
    
      @Test
      fun testPublicSuffixes() {
        platform.assumeNotGraalVMImage()
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 24 09:33:12 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/ws/WebSocketHttpTest.kt

        )
        webSocket.cancel()
      }
    
      @Test
      @Throws(IOException::class)
      fun clientIncludesForbiddenHeader() {
        newWebSocket(
          Request.Builder()
            .url(webServer.url("/"))
            .header("Sec-WebSocket-Extensions", "permessage-deflate")
            .build(),
        )
        clientListener.assertFailure(
          ProtocolException::class.java,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 35.2K bytes
    - Viewed (1)
  9. 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 (0)
  10. 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)
Back to top