- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 18 for NewRequest (0.06 sec)
-
okhttp/src/jvmTest/kotlin/okhttp3/URLConnectionTest.kt
server.enqueue(response) assertContent("ABCDEFGHIJKLMNOPQR", getResponse(newRequest("/foo"))) assertThat(server.takeRequest().exchangeIndex).isEqualTo(0) assertContent("ABCDEFGHIJKLMNOPQR", getResponse(newRequest("/bar?baz=quux"))) assertThat(server.takeRequest().exchangeIndex).isEqualTo(1) assertContent("ABCDEFGHIJKLMNOPQR", getResponse(newRequest("/z"))) assertThat(server.takeRequest().exchangeIndex).isEqualTo(2) }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Jun 21 20:36:35 UTC 2025 - 133.2K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/DispatcherTest.kt
client.newWebSocket(newRequest("http://a/3"), webSocketListener) executor.assertJobs("http://a/1", "http://a/2", "http://a/3") } @Test fun increasingMaxRequestsPromotesJobsImmediately() { dispatcher.maxRequests = 2 client.newCall(newRequest("http://a/1")).enqueue(callback) client.newCall(newRequest("http://b/1")).enqueue(callback)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 12.7K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/session/Smb2LogoffRequestTest.java
// Helper to create a fresh request under test private Smb2LogoffRequest newRequest() { return new Smb2LogoffRequest(configuration); } @Test @DisplayName("size() returns 8-byte aligned value (header + 4)") void size_returnsAlignedValue() { // Arrange Smb2LogoffRequest req = newRequest(); int base = Smb2Constants.SMB2_HEADER_LENGTH + 4; // structure size
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 5.4K bytes - Viewed (0) -
cmd/signature-v4-utils_test.go
} for i, testCase := range testCases { // creating an input HTTP request. // Only the headers are relevant for this particular test. inputReq, err := http.NewRequest(http.MethodGet, "http://example.com", nil) if err != nil { t.Fatalf("Error initializing input HTTP request: %v", err) } if testCase.inputQueryKey != "" { q := inputReq.URL.Query()
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Wed Apr 09 14:28:39 UTC 2025 - 14.3K bytes - Viewed (0) -
cmd/object-handlers-common_test.go
expectedFlag: true, expectedCode: 304, }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { recorder := httptest.NewRecorder() request := httptest.NewRequest(http.MethodHead, "/bucket/a", bytes.NewReader([]byte{})) request.Header.Set(xhttp.IfNoneMatch, tc.ifNoneMatch) request.Header.Set(xhttp.IfModifiedSince, tc.ifModifiedSince) request.Header.Set(xhttp.IfMatch, tc.ifMatch)
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Wed Apr 09 14:28:39 UTC 2025 - 5.3K bytes - Viewed (0) -
cmd/object-api-options_test.go
"test1": {}, "test2": {}, "test3": {}, "test4": {}, }, }, } for _, testCase := range testCases { t.Run(testCase.name, func(t *testing.T) { rec := httptest.NewRecorder() req := httptest.NewRequest("GET", "/test", nil) req.Header = testCase.headers opts, _ := getAndValidateAttributesOpts(ctx, rec, req, bucket, "testobject") if !reflect.DeepEqual(opts.ObjectAttributes, testCase.wantObjectAttrs) {
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Wed Apr 09 14:28:39 UTC 2025 - 2.4K bytes - Viewed (0) -
samples/compare/src/test/kotlin/okhttp3/compare/JettyHttpClientTest.kt
} @AfterEach fun tearDown() { client.stop() } @Test fun get() { server.enqueue(MockResponse(body = "hello, Jetty HTTP Client")) val request = client .newRequest(server.url("/").toUri()) .header("Accept", "text/plain") val response = request.send() assertThat(response.status).isEqualTo(200) assertThat(response.contentAsString).isEqualTo("hello, Jetty HTTP Client")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 2.1K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/RequestWithFileIdTest.java
// Since we can't directly verify the internal state, we create a new request to test Smb2CloseRequest newRequest = new Smb2CloseRequest(mockConfig, testFileId); assertNotNull(newRequest, "Should create request with new file ID"); } @Test @DisplayName("Should handle null file ID") void testSetNullFileId() { // Given
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.9K bytes - Viewed (0) -
cmd/signature-v2_test.go
query := url.Values{} for key, value := range testCase.queryParams { query.Set(key, value) } // Create a request to use. req, err := http.NewRequest(http.MethodGet, "http://host/a/b?"+query.Encode(), nil) if err != nil { t.Errorf("(%d) failed to create http.Request, got %v", i, err) } if testCase.expected != ErrNone {
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 8K bytes - Viewed (0) -
cmd/object-lambda-handlers_test.go
Headers: map[string][]string{}, }, UserIdentity: levent.Identity{ PrincipalID: "test-user", }, }, nil } body := []byte{} req := httptest.NewRequest("GET", "/objectlambda/"+bucketName+"/"+objectName+"?lambdaArn="+url.QueryEscape(lambdaARN), bytes.NewReader(body)) req.Form = url.Values{"lambdaArn": []string{lambdaARN}} req.Header.Set("Host", "localhost")
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Fri Jul 18 21:56:31 UTC 2025 - 5.2K bytes - Viewed (0)