Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for endpoint (0.26 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. samples/guide/src/main/java/okhttp3/recipes/PostMultipart.java

      private final OkHttpClient client = new OkHttpClient();
    
      public void run() throws Exception {
        // Use the imgur image upload API as documented at https://api.imgur.com/endpoints/image
        RequestBody requestBody = new MultipartBody.Builder()
            .setType(MultipartBody.FORM)
            .addFormDataPart("title", "Square Logo")
            .addFormDataPart("image", "logo-square.png",
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jun 24 12:59:42 GMT 2019
    - 2.2K bytes
    - Viewed (0)
  9. samples/guide/src/main/java/okhttp3/recipes/kt/PostMultipart.kt

    import okhttp3.RequestBody.Companion.asRequestBody
    
    class PostMultipart {
      private val client = OkHttpClient()
    
      fun run() {
        // Use the imgur image upload API as documented at https://api.imgur.com/endpoints/image
        val requestBody =
          MultipartBody.Builder()
            .setType(MultipartBody.FORM)
            .addFormDataPart("title", "Square Logo")
            .addFormDataPart(
              "image",
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.1K bytes
    - Viewed (0)
Back to top