Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 33 for com (0.13 sec)

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

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3.slack;
    
    import com.squareup.moshi.FromJson;
    import com.squareup.moshi.JsonAdapter;
    import com.squareup.moshi.Moshi;
    import com.squareup.moshi.ToJson;
    import java.io.IOException;
    import okhttp3.Call;
    import okhttp3.HttpUrl;
    import okhttp3.WebSocket;
    import okhttp3.OkHttpClient;
    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)
  2. samples/guide/src/main/java/okhttp3/recipes/PostFile.java

      private final OkHttpClient client = new OkHttpClient();
    
      public void run() throws Exception {
        File file = new File("README.md");
    
        Request request = new Request.Builder()
            .url("https://api.github.com/markdown/raw")
            .post(RequestBody.create(file, MEDIA_TYPE_MARKDOWN))
            .build();
    
        try (Response response = client.newCall(request).execute()) {
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat May 25 18:02:55 GMT 2019
    - 1.5K bytes
    - Viewed (0)
  3. regression-test/src/androidTest/java/okhttp/regression/IssueReproductionTest.java

    @RunWith(AndroidJUnit4.class)
    public class IssueReproductionTest {
      @Test public void getFailsWithoutAdditionalCert() throws IOException {
        OkHttpClient client = new OkHttpClient();
    
        sendRequest(client, "https://google.com/robots.txt");
      }
    
      private void sendRequest(OkHttpClient client, String url) throws IOException {
        Request request = new Request.Builder()
                .url(url)
                .build();
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jul 26 06:37:08 GMT 2021
    - 1.9K bytes
    - Viewed (0)
  4. samples/guide/src/main/java/okhttp3/recipes/PostStreaming.java

              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();
    
        try (Response response = client.newCall(request).execute()) {
          if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
    
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Jul 06 03:18:15 GMT 2018
    - 2.1K bytes
    - Viewed (0)
  5. samples/guide/src/main/java/okhttp3/recipes/RequestBodyCompression.java

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3.recipes;
    
    import com.squareup.moshi.JsonAdapter;
    import com.squareup.moshi.Moshi;
    import com.squareup.moshi.Types;
    import java.io.IOException;
    import java.util.LinkedHashMap;
    import java.util.Map;
    import okhttp3.Interceptor;
    import okhttp3.MediaType;
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat May 25 18:02:55 GMT 2019
    - 3.8K bytes
    - Viewed (0)
  6. samples/simple-client/src/main/java/okhttp3/sample/OkHttpContributors.java

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3.sample;
    
    import com.squareup.moshi.JsonAdapter;
    import com.squareup.moshi.Moshi;
    import com.squareup.moshi.Types;
    import java.util.Collections;
    import java.util.List;
    import okhttp3.OkHttpClient;
    import okhttp3.Request;
    import okhttp3.Response;
    import okhttp3.ResponseBody;
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  7. samples/guide/src/main/java/okhttp3/guide/GetExample.java

          return response.body().string();
        }
      }
    
      public static void main(String[] args) throws IOException {
        GetExample example = new GetExample();
        String response = example.run("https://raw.github.com/square/okhttp/master/README.md");
        System.out.println(response);
      }
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 1.3K bytes
    - Viewed (0)
  8. regression-test/src/androidTest/java/okhttp/regression/compare/OkHttpClientTest.java

    @RunWith(AndroidJUnit4.class)
    public class OkHttpClientTest {
      @Test public void get() throws IOException {
        OkHttpClient client = new OkHttpClient();
        Request request = new Request.Builder()
            .url("https://google.com/robots.txt")
            .build();
        try (Response response = client.newCall(request).execute()) {
          assertEquals(200, response.code());
          assertEquals(Protocol.HTTP_2, response.protocol());
        }
      }
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Nov 14 17:38:22 GMT 2020
    - 1.4K bytes
    - Viewed (0)
  9. samples/guide/src/main/java/okhttp3/recipes/CheckHandshake.java

          .addNetworkInterceptor(CHECK_HANDSHAKE_INTERCEPTOR)
          .build();
    
      public void run() throws Exception {
        Request request = new Request.Builder()
            .url("https://publicobject.com/helloworld.txt")
            .build();
    
        try (Response response = client.newCall(request).execute()) {
          if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
    
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 15 14:55:09 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  10. samples/guide/src/main/java/okhttp3/recipes/RewriteResponseCacheControl.java

      }
    
      public void run() throws Exception {
        for (int i = 0; i < 5; i++) {
          System.out.println("    Request: " + i);
    
          Request request = new Request.Builder()
              .url("https://api.github.com/search/repositories?q=http")
              .build();
    
          OkHttpClient clientForCall;
          if (i == 2) {
            // Force this request's response to be written to the cache. This way, subsequent responses
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 12 03:31:36 GMT 2019
    - 2.6K bytes
    - Viewed (0)
Back to top