- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 15 for newClient (0.05 seconds)
-
okhttp/src/jvmTest/kotlin/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()
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Wed Jun 18 12:28:21 GMT 2025 - 13.4K bytes - Click Count (1) -
okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt
import org.junit.jupiter.api.extension.ExtensionContext /** * Apply this rule to all tests. It adds additional checks for leaked resources and uncaught * exceptions. * * Use [newClient] as a factory for a OkHttpClient instances. These instances are specifically * configured for testing. */ class OkHttpClientTestRule : BeforeEachCallback, AfterEachCallback {
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Tue Nov 04 19:13:52 GMT 2025 - 10.8K bytes - Click Count (0) -
internal/event/target/kafka.go
target.config = config brokers := []string{} for _, broker := range args.Brokers { brokers = append(brokers, broker.String()) } client, err := sarama.NewClient(brokers, config) if err != nil { if !errors.Is(err, sarama.ErrOutOfBrokers) { target.loggerOnce(context.Background(), err, target.ID().String()) } return err }Created: Sun Dec 28 19:28:13 GMT 2025 - Last Modified: Fri Sep 06 23:06:30 GMT 2024 - 13.6K bytes - Click Count (0) -
internal/dsync/dsync_test.go
// TestMain initializes the testing framework func TestMain(m *testing.M) { startLockServers() // Initialize locker clients for dsync. var clnts []NetLocker for i := range nodes { clnts = append(clnts, newClient(nodes[i].URL)) } ds = &Dsync{ GetLockers: func() ([]NetLocker, string) { return clnts, uuid.New().String() }, Timeouts: Timeouts{ Acquire: testDrwMutexAcquireTimeout,
Created: Sun Dec 28 19:28:13 GMT 2025 - Last Modified: Fri Aug 29 02:39:48 GMT 2025 - 10.8K bytes - Click Count (0) -
internal/rest/client.go
} // Close closes all idle connections of the underlying http client func (c *Client) Close() { atomic.StoreInt32(&c.connected, closed) } // NewClient - returns new REST client. func NewClient(uu *url.URL, tr http.RoundTripper, auth func() string) *Client { connected := int32(online) urlStr := uu.String() u, err := url.Parse(urlStr) if err != nil {
Created: Sun Dec 28 19:28:13 GMT 2025 - Last Modified: Sun Sep 28 20:59:21 GMT 2025 - 14.7K bytes - Click Count (0) -
cmd/storage-rest-client.go
Host: endpoint.Host, Path: path.Join(storageRESTPrefix, endpoint.Path, storageRESTVersion), } restClient := rest.NewClient(serverURL, globalInternodeTransport, newCachedAuthToken()) if healthCheck { // Use a separate client to avoid recursive calls. healthClient := rest.NewClient(serverURL, globalInternodeTransport, newCachedAuthToken()) healthClient.NoMetrics = true restClient.HealthCheckFn = func() bool {
Created: Sun Dec 28 19:28:13 GMT 2025 - Last Modified: Fri Aug 08 02:38:41 GMT 2025 - 30.4K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/WholeOperationTimeoutTest.kt
import org.junit.jupiter.api.extension.RegisterExtension @Timeout(30) @Tag("Slow") class WholeOperationTimeoutTest { @RegisterExtension val clientTestRule = OkHttpClientTestRule() private val client = clientTestRule.newClient() @StartStop private val server = MockWebServer() @Test fun defaultConfigIsNoTimeout() { val request = Request .Builder() .url(server.url("/")) .build()Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Wed Jun 18 12:28:21 GMT 2025 - 10.6K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CookiesTest.kt
@Timeout(30) class CookiesTest { @RegisterExtension val clientTestRule = OkHttpClientTestRule() @StartStop private val server = MockWebServer() private var client = clientTestRule.newClient() @Test fun testNetscapeResponse() { val cookieManager = CookieManager(null, CookiePolicy.ACCEPT_ORIGINAL_SERVER) client = client .newBuilder()Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Wed Jun 18 12:28:21 GMT 2025 - 13K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/ConnectionReuseTest.kt
@StartStop private val server = MockWebServer() private val handshakeCertificates = platform.localhostHandshakeCertificates() private var client: OkHttpClient = clientTestRule.newClient() @Test fun connectionsAreReused() { server.enqueue(MockResponse(body = "a")) server.enqueue(MockResponse(body = "b")) val request = Request(server.url("/"))
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Fri Jun 20 11:46:46 GMT 2025 - 12.2K bytes - Click Count (1) -
cmd/peer-rest-client.go
} serverURL := &url.URL{ Scheme: scheme, Host: peer.String(), Path: peerRESTPath, } restClient := rest.NewClient(serverURL, globalInternodeTransport, newCachedAuthToken()) // Use a separate client to avoid recursive calls. healthClient := rest.NewClient(serverURL, globalInternodeTransport, newCachedAuthToken()) healthClient.NoMetrics = true // Construct a new health function.Created: Sun Dec 28 19:28:13 GMT 2025 - Last Modified: Sun Sep 28 20:59:21 GMT 2025 - 26.1K bytes - Click Count (0)