Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for Genver (0.17 sec)

  1. mockwebserver/README.md

      // instance for every unit test.
      MockWebServer server = new MockWebServer();
    
      // Schedule some responses.
      server.enqueue(new MockResponse().setBody("hello, world!"));
      server.enqueue(new MockResponse().setBody("sup, bra?"));
      server.enqueue(new MockResponse().setBody("yo dog"));
    
      // Start the server.
      server.start();
    
      // Ask the server for its URL. You'll need this to make HTTP requests.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 5K bytes
    - Viewed (1)
  2. README.md

      Request request = new Request.Builder()
          .url(url)
          .build();
    
      try (Response response = client.newCall(request).execute()) {
        return response.body().string();
      }
    }
    ```
    
    
    Post to a Server
    ----------------
    
    This program posts data to a service. [Full source][post_example].
    
    ```java
    public static final MediaType JSON = MediaType.get("application/json");
    
    OkHttpClient client = new OkHttpClient();
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 6.2K bytes
    - Viewed (0)
  3. okhttp-tls/README.md

    ---------------------
    
    The above scenario is representative of most TLS set ups: the client uses certificates to validate
    the identity of a server. The converse is also possible. Here we create a server that authenticates
    a client and a client that authenticates a server.
    
    ```java
    // Create the root for client and server to trust. We could also use different roots for each!
    HeldCertificate rootCertificate = new HeldCertificate.Builder()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 9.1K bytes
    - Viewed (1)
  4. mockwebserver-junit5/README.md

    ```
    class MyTest {
      @Test
      void test(MockWebServer server) {
        ...
      }
    }
    ```
    
    Alternately you may add the [MockWebServer] as a constructor parameter:
    
    ```
    class MyTest {
      private final MockWebServer server;
    
      MyTest(MockWebServer server) {
        this.server = server;
      }
    
      @Test
      void test() {
        ...
      }
    }
    ```
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 1.3K bytes
    - Viewed (0)
  5. okhttp-sse/README.md

    OkHttp Server-Sent Events
    =========================
    
    Experimental support for server-sent events.
    API is not considered stable and may change at any time.
    
    ### Download
    
    ```kotlin
    testImplementation("com.squareup.okhttp3:okhttp-sse:4.12.0")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 245 bytes
    - Viewed (0)
  6. mockwebserver-junit4/README.md

    ```
    
    Then in tests annotated `@org.junit.Test`, you may declare a field with the `@Rule` annotation:
    
    ```
    @Rule public final MockWebServerRule serverRule = new MockWebServerRule();
    ```
    
    The `serverRule` field has a `server` field. It is an instance of `MockWebServer`. That instance
    will be shut down automatically after the test runs.
    
    For Kotlin, the `@JvmField` annotation is also necessary:
    
    ```
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 707 bytes
    - Viewed (1)
Back to top