Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 28 for body (0.15 sec)

  1. samples/guide/src/main/java/okhttp3/recipes/PostForm.java

            .build();
    
        try (Response response = client.newCall(request).execute()) {
          if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
    
          System.out.println(response.body().string());
        }
      }
    
      public static void main(String... args) throws Exception {
        new PostForm().run();
      }
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun May 22 01:29:42 GMT 2016
    - 1.4K bytes
    - Viewed (0)
  2. samples/guide/src/main/java/okhttp3/recipes/AsynchronousGet.java

            e.printStackTrace();
          }
    
          @Override public void onResponse(Call call, Response response) throws IOException {
            try (ResponseBody responseBody = response.body()) {
              if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
    
              Headers responseHeaders = response.headers();
              for (int i = 0, size = responseHeaders.size(); i < size; i++) {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun May 22 01:29:42 GMT 2016
    - 1.9K bytes
    - Viewed (0)
  3. samples/guide/src/main/java/okhttp3/recipes/Authenticate.java

            .build();
    
        try (Response response = client.newCall(request).execute()) {
          if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
    
          System.out.println(response.body().string());
        }
      }
    
      public static void main(String... args) throws Exception {
        new Authenticate().run();
      }
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Aug 12 07:26:27 GMT 2021
    - 1.9K bytes
    - Viewed (0)
  4. samples/guide/src/main/java/okhttp3/recipes/ParseResponseWithMoshi.java

            .build();
        try (Response response = client.newCall(request).execute()) {
          if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
    
          Gist gist = gistJsonAdapter.fromJson(response.body().source());
    
          for (Map.Entry<String, GistFile> entry : gist.files.entrySet()) {
            System.out.println(entry.getKey());
            System.out.println(entry.getValue().content);
          }
        }
      }
    
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun May 22 01:29:42 GMT 2016
    - 1.8K bytes
    - Viewed (0)
  5. samples/guide/src/main/java/okhttp3/recipes/PostString.java

            .build();
    
        try (Response response = client.newCall(request).execute()) {
          if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
    
          System.out.println(response.body().string());
        }
      }
    
      public static void main(String... args) throws Exception {
        new PostString().run();
      }
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat May 25 18:02:55 GMT 2019
    - 1.7K bytes
    - Viewed (0)
  6. samples/static-server/src/main/java/okhttp3/sample/SampleServer.java

        response.append(String.format("<html><head><title>%s</title></head><body>", basePath));
        response.append(String.format("<h1>%s</h1>", basePath));
        for (String file : directory.list()) {
          response.append(String.format("<div class='file'><a href='%s'>%s</a></div>",
              basePath + file, file));
        }
        response.append("</body></html>");
    
        return new MockResponse()
            .setStatus("HTTP/1.1 200")
    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/slack/src/main/java/okhttp3/slack/SlackApi.java

        Call call = httpClient.newCall(request);
        try (Response response = call.execute()) {
          JsonAdapter<OAuthSession> jsonAdapter = moshi.adapter(OAuthSession.class);
          return jsonAdapter.fromJson(response.body().source());
        }
      }
    
      /** See https://api.slack.com/methods/rtm.start. */
      public RtmStartResponse rtmStart(String accessToken) throws IOException {
        HttpUrl url = baseUrl.newBuilder("rtm.start")
    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)
  8. samples/guide/src/main/java/okhttp3/recipes/PostFile.java

            .build();
    
        try (Response response = client.newCall(request).execute()) {
          if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
    
          System.out.println(response.body().string());
        }
      }
    
      public static void main(String... args) throws Exception {
        new PostFile().run();
      }
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat May 25 18:02:55 GMT 2019
    - 1.5K bytes
    - Viewed (0)
  9. samples/guide/src/main/java/okhttp3/recipes/PostStreaming.java

            .build();
    
        try (Response response = client.newCall(request).execute()) {
          if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
    
          System.out.println(response.body().string());
        }
      }
    
      public static void main(String... args) throws Exception {
        new PostStreaming().run();
      }
    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)
  10. samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/ClientAndServer.java

        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();
        socketFile.delete();
      }
    
      public static void main(String... args) throws Exception {
        new ClientAndServer().run();
      }
    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)
Back to top