Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 72 for newClient (0.16 sec)

  1. okhttp/src/test/java/okhttp3/OkHttpClientTest.kt

          builder.protocols(listOf(Protocol.HTTP_1_0, Protocol.HTTP_1_1))
        }
      }
    
      @Test fun certificatePinnerEquality() {
        val clientA = clientTestRule.newClient()
        val clientB = clientTestRule.newClient()
        assertThat(clientB.certificatePinner).isEqualTo(clientA.certificatePinner)
      }
    
      @Test fun nullInterceptorInList() {
        val builder = OkHttpClient.Builder()
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sun Mar 31 17:16:15 UTC 2024
    - 13.2K bytes
    - Viewed (0)
  2. native-image-tests/src/main/kotlin/okhttp3/SampleTest.kt

        server.enqueue(MockResponse(body = "abc"))
    
        val client = clientRule.newClient()
    
        client.newCall(Request(url = server.url("/"))).execute().use {
          assertThat(it.body.string()).isEqualTo("abc")
        }
      }
    
      @Test
      fun testExternalSite() {
        val client = clientRule.newClient()
    
        client.newCall(Request(url = "https://google.com/robots.txt".toHttpUrl())).execute().use {
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  3. internal/dsync/dsync-client_test.go

    type ReconnectRESTClient struct {
    	u    *url.URL
    	rest *rest.Client
    }
    
    // newClient constructs a ReconnectRESTClient object with addr and endpoint initialized.
    // It _doesn't_ connect to the remote endpoint. See Call method to see when the
    // connect happens.
    func newClient(endpoint string) NetLocker {
    	u, err := url.Parse(endpoint)
    	if err != nil {
    		panic(err)
    	}
    
    	tr := &http.Transport{
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jan 20 17:36:09 UTC 2022
    - 4.4K bytes
    - Viewed (0)
  4. src/net/rpc/jsonrpc/client.go

    		return nil
    	}
    	return json.Unmarshal(*c.resp.Result, x)
    }
    
    func (c *clientCodec) Close() error {
    	return c.c.Close()
    }
    
    // NewClient returns a new [rpc.Client] to handle requests to the
    // set of services at the other end of the connection.
    func NewClient(conn io.ReadWriteCloser) *rpc.Client {
    	return rpc.NewClientWithCodec(NewClientCodec(conn))
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 3K bytes
    - Viewed (0)
  5. src/net/rpc/client.go

    // concurrent reads or concurrent writes.
    func NewClient(conn io.ReadWriteCloser) *Client {
    	encBuf := bufio.NewWriter(conn)
    	client := &gobClientCodec{conn, gob.NewDecoder(conn), gob.NewEncoder(encBuf), encBuf}
    	return NewClientWithCodec(client)
    }
    
    // NewClientWithCodec is like [NewClient] but uses the specified
    // codec to encode requests and decode responses.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 9K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/server/genericapiserver_graceful_termination_test.go

    //	         return nil
    func TestGracefulTerminationWithKeepListeningDuringGracefulTerminationDisabled(t *testing.T) {
    	fakeAudit := &fakeAudit{}
    	s := newGenericAPIServer(t, fakeAudit, false)
    	connReusingClient := newClient(false)
    	doer := setupDoer(t, s.SecureServingInfo)
    
    	// handler for a non long-running and a watch request that
    	// we want to keep in flight through to the end.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 18:59:21 UTC 2024
    - 38.3K bytes
    - Viewed (0)
  7. tests/integration/helm/upgrade/util.go

    		upgradeCharts(t, h, overrideValuesFile, nsConfig, isAmbient)
    		helmtest.VerifyInstallation(t, cs, nsConfig, true, isAmbient, "")
    
    		_, newClient, newServer := sanitycheck.SetupTrafficTest(t, t, "")
    		sanitycheck.RunTrafficTestClientServer(t, newClient, newServer)
    
    		// now check that we are compatible with N-1 proxy with N proxy
    		sanitycheck.RunTrafficTestClientServer(t, oldClient, newServer)
    	}
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 09 19:04:51 UTC 2024
    - 14.4K bytes
    - Viewed (0)
  8. mockwebserver-junit5/src/test/java/mockwebserver3/junit5/internal/ExtensionLifecycleTest.kt

        assertThat(server).isSameInstanceAs(instanceServer)
    
        clientTestRule.newClient().newCall(Request(server.url("/"))).execute().use {
          assertThat(it.code).isEqualTo(200)
        }
      }
    
      @Test
      fun testClient2(server: MockWebServer) {
        assertThat(server).isSameInstanceAs(instanceServer)
    
        clientTestRule.newClient().newCall(Request(server.url("/"))).execute().use {
          assertThat(it.code).isEqualTo(200)
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sun Feb 11 12:12:36 UTC 2024
    - 3K bytes
    - Viewed (0)
  9. platforms/core-execution/workers/src/test/groovy/org/gradle/workers/internal/WorkerDaemonClientsManagerTest.groovy

            input == [noMatch] //match removed from input
        }
    
        def "reserves new client"() {
            def newClient = Stub(WorkerDaemonClient)
            starter.startDaemon(options) >> newClient
    
            when:
            def client = manager.reserveNewClient(options)
    
            then:
            newClient == client
        }
    
        def "can stop all created clients"() {
            def client1 = Mock(WorkerDaemonClient)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Mar 21 14:56:11 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  10. src/net/smtp/smtp_test.go

    	var wrote strings.Builder
    	var fake faker
    	fake.ReadWriter = struct {
    		io.Reader
    		io.Writer
    	}{
    		strings.NewReader(server),
    		&wrote,
    	}
    	c, err := NewClient(fake, "fake.host")
    	if err != nil {
    		t.Fatalf("NewClient: %v", err)
    	}
    	c.tls = true
    	c.didHello = true
    	c.Auth(toServerEmptyAuth{})
    	c.Close()
    	if got, want := wrote.String(), "AUTH FOOAUTH\r\n*\r\nQUIT\r\n"; got != want {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 28.5K bytes
    - Viewed (0)
Back to top