Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for NewRequest (0.19 sec)

  1. okhttp/src/test/java/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)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  2. 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()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 05 21:26:41 GMT 2024
    - 14.3K bytes
    - Viewed (0)
  3. internal/grid/handlers.go

    func (h *SingleHandler[Req, Resp]) NewResponse() Resp {
    	return h.newResp()
    }
    
    // NewRequest creates a new request.
    // Handlers can use this to create a reusable request.
    // The request may be reused, so caller should clear any fields.
    func (h *SingleHandler[Req, Resp]) NewRequest() Req {
    	return h.newReq()
    }
    
    // Register a handler for a Req -> Resp roundtrip.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 23 17:15:52 GMT 2024
    - 27.1K bytes
    - Viewed (0)
  4. internal/rest/client.go

    func removeEmptyPort(host string) string {
    	if hasPort(host) {
    		return strings.TrimSuffix(host, ":")
    	}
    	return host
    }
    
    // Copied from http.NewRequest but implemented to ensure we reuse `url.URL` instance.
    func (c *Client) newRequest(ctx context.Context, u url.URL, body io.Reader) (*http.Request, error) {
    	rc, ok := body.(io.ReadCloser)
    	if !ok && body != nil {
    		rc = io.NopCloser(body)
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 14.4K bytes
    - Viewed (0)
  5. okhttp/src/main/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 {
          return cachedResponse.headers.varyFields().none {
            cachedRequest.values(it) != newRequest.headers(it)
          }
        }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  6. cmd/auth-handler_test.go

    		{"X-Amz-Content-Sha256", "", false},
    	}
    
    	for i, testCase := range testCases {
    		// creating an input HTTP request.
    		// Only the query parameters 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)
    		}
    		q := inputReq.URL.Query()
    		q.Add(testCase.inputQueryKey, testCase.inputQueryValue)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  7. 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,
    		}
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 24 04:08:47 GMT 2024
    - 18.7K 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) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Feb 23 21:28:14 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  9. istioctl/pkg/admin/istiodconfig.go

    	var jsonScopeInfo bytes.Buffer
    	err := json.NewEncoder(&jsonScopeInfo).Encode(scope)
    	if err != nil {
    		return fmt.Errorf("cannot serialize scope %+v", *scope)
    	}
    	req, err := http.NewRequest(http.MethodPut, c.baseURL.String()+"/"+scope.Name, &jsonScopeInfo)
    	if err != nil {
    		return err
    	}
    	defer req.Body.Close()
    
    	resp, err := c.httpClient.Do(req)
    	if err != nil {
    		return err
    	}
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Sat Apr 13 05:23:38 GMT 2024
    - 13.5K bytes
    - Viewed (0)
  10. internal/config/identity/plugin/config.go

    	CloseRespFn func(r io.ReadCloser)
    
    	RolePolicy string
    	RoleARN    arn.ARN
    }
    
    // Validate - validate configuration params.
    func (a *Args) Validate() error {
    	req, err := http.NewRequest(http.MethodPost, a.URL.String(), bytes.NewReader([]byte("")))
    	if err != nil {
    		return err
    	}
    
    	req.Header.Set("Content-Type", "application/json")
    	if a.AuthToken != "" {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 13.3K bytes
    - Viewed (3)
Back to top