Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for midpoint (0.31 sec)

  1. samples/simple-client/src/main/java/okhttp3/sample/OkHttpContributors.java

    import java.util.List;
    import okhttp3.OkHttpClient;
    import okhttp3.Request;
    import okhttp3.Response;
    import okhttp3.ResponseBody;
    
    public class OkHttpContributors {
      private static final String ENDPOINT = "https://api.github.com/repos/square/okhttp/contributors";
      private static final Moshi MOSHI = new Moshi.Builder().build();
      private static final JsonAdapter<List<Contributor>> CONTRIBUTORS_JSON_ADAPTER = MOSHI.adapter(
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  2. samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/UnixDomainServerSocketFactory.java

        private UnixServerSocketChannel serverSocketChannel;
        private InetSocketAddress endpoint;
    
        UnixDomainServerSocket() throws IOException {
        }
    
        @Override public void bind(SocketAddress endpoint, int backlog) throws IOException {
          this.endpoint = (InetSocketAddress) endpoint;
    
          UnixSocketAddress address = new UnixSocketAddress(path);
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Feb 12 16:33:52 GMT 2019
    - 3.1K bytes
    - Viewed (0)
  3. container-tests/src/test/java/okhttp3/containers/BasicProxyTest.kt

          .withNetworkAliases("mockserver")
    
      @Test
      fun testOkHttpDirect() {
        testRequest {
          val client = OkHttpClient()
    
          val response =
            client.newCall(
              Request((mockServer.endpoint + "/person?name=peter").toHttpUrl()),
            ).execute()
    
          assertThat(response.body.string()).contains("Peter the person")
          assertThat(response.protocol).isEqualTo(Protocol.HTTP_1_1)
        }
      }
    
      @Test
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  4. container-tests/src/test/java/okhttp3/containers/BasicMockServerTest.kt

              request().withPath("/person")
                .withQueryStringParameter("name", "peter"),
            )
            .respond(response().withBody("Peter the person!"))
    
          val response = client.newCall(Request((mockServer.endpoint + "/person?name=peter").toHttpUrl())).execute()
    
          assertThat(response.body.string()).contains("Peter the person")
        }
      }
    
      @Test
      fun testHttpsRequest() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/ws/WebSocketHttpTest.kt

      fun reconnectingToNonWebSocket() {
        for (i in 0..29) {
          webServer.enqueue(
            MockResponse.Builder()
              .bodyDelay(100, TimeUnit.MILLISECONDS)
              .body("Wrong endpoint")
              .code(401)
              .build(),
          )
        }
        val request =
          Request.Builder()
            .url(webServer.url("/"))
            .build()
        val attempts = CountDownLatch(20)
    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)
  6. samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/TunnelingUnixSocket.java

      }
    
      @Override public void connect(SocketAddress endpoint) throws IOException {
        this.inetSocketAddress = (InetSocketAddress) endpoint;
        super.connect(new UnixSocketAddress(path), 0);
      }
    
      @Override public void connect(SocketAddress endpoint, int timeout) throws IOException {
        this.inetSocketAddress = (InetSocketAddress) endpoint;
        super.connect(new UnixSocketAddress(path), timeout);
      }
    
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Feb 12 16:33:52 GMT 2019
    - 1.9K bytes
    - Viewed (1)
  7. okhttp-testing-support/src/main/kotlin/okhttp3/SpecificHostSocketFactory.kt

      ) {
        hostMapping[requested] = real
      }
    
      override fun createSocket(): Socket {
        return object : Socket() {
          override fun connect(
            endpoint: SocketAddress?,
            timeout: Int,
          ) {
            val requested = (endpoint as InetSocketAddress)
            val inetSocketAddress = hostMapping[requested.address] ?: defaultAddress ?: requested
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/CallKotlinTest.kt

          }
        }
    
        server.enqueue(MockResponse(code = 201))
        server.enqueue(MockResponse(code = 204))
        server.enqueue(MockResponse(code = 204))
    
        val endpointUrl = server.url("/endpoint")
    
        var request =
          Request.Builder()
            .url(endpointUrl)
            .header("Content-Type", "application/xml")
            .put(ValidRequestBody())
            .build()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt

        writer.flush()
      }
    
      /**
       * Degrades this connection such that new streams can neither be created locally, nor accepted
       * from the remote peer. Existing streams are not impacted. This is intended to permit an endpoint
       * to gracefully stop accepting new requests without harming previously established streams.
       */
      @Throws(IOException::class)
      fun shutdown(statusCode: ErrorCode) {
        writer.withLock {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 32.6K bytes
    - Viewed (0)
Back to top