Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for NewRequest (0.05 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Cache.kt

         * Returns true if none of the Vary headers have changed between [cachedRequest] and
         * [newRequest].
         */
        fun varyMatches(
          cachedResponse: Response,
          cachedRequest: Headers,
          newRequest: Request,
        ): Boolean =
          cachedResponse.headers.varyFields().none {
            cachedRequest.values(it) != newRequest.headers(it)
          }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 26.9K bytes
    - Viewed (0)
  8. cmd/utils_test.go

    		if !testCase.shouldPass && err == nil {
    			t.Errorf("Test %d: expected to fail but passed.", i+1)
    		}
    	}
    }
    
    // Testing dumping request function.
    func TestDumpRequest(t *testing.T) {
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 10.2K bytes
    - Viewed (0)
  9. cmd/update.go

    	}
    	uaAppend(")", "")
    
    	return strings.Join(userAgentParts, "")
    }
    
    func downloadReleaseURL(u *url.URL, timeout time.Duration, mode string) (content string, err error) {
    	req, err := http.NewRequest(http.MethodGet, u.String(), nil)
    	if err != nil {
    		return content, AdminError{
    			Code:       AdminUpdateUnexpectedFailure,
    			Message:    err.Error(),
    			StatusCode: http.StatusInternalServerError,
    		}
    	}
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Tue Aug 12 18:20:36 UTC 2025
    - 18.9K bytes
    - Viewed (0)
  10. cmd/post-policy_test.go

    	}
    	writer.Write([]byte("hello world"))
    	// Close before creating the new request.
    	w.Close()
    
    	// Set the body equal to the created policy.
    	reader := bytes.NewReader(buf.Bytes())
    
    	req, err := http.NewRequest(http.MethodPost, makeTestTargetURL(endPoint, bucketName, "", nil), reader)
    	if err != nil {
    		return nil, err
    	}
    
    	// Set form content-type.
    	req.Header.Set("Content-Type", w.FormDataContentType())
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 30.6K bytes
    - Viewed (0)
Back to top