- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 27 for newRequest (0.08 sec)
-
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)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Apr 05 03:30:42 UTC 2024 - 12.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/URLConnectionTest.kt
server.enqueue(response) assertContent("ABCDEFGHIJKLMNOPQR", getResponse(newRequest("/foo"))) assertThat(server.takeRequest().sequenceNumber).isEqualTo(0) assertContent("ABCDEFGHIJKLMNOPQR", getResponse(newRequest("/bar?baz=quux"))) assertThat(server.takeRequest().sequenceNumber).isEqualTo(1) assertContent("ABCDEFGHIJKLMNOPQR", getResponse(newRequest("/z"))) assertThat(server.takeRequest().sequenceNumber).isEqualTo(2) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 131.7K 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 Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 03 06:33:53 UTC 2024 - 5.3K 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 Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Apr 05 21:26:41 UTC 2024 - 14.3K bytes - Viewed (0) -
internal/config/identity/openid/provider/keycloak.go
values := url.Values{} values.Set("client_id", clientID) values.Set("client_secret", clientSecret) values.Set("grant_type", "client_credentials") req, err := http.NewRequest(http.MethodPost, k.oeConfig.TokenEndpoint, strings.NewReader(values.Encode())) if err != nil { return err } req.Header.Set("Content-Type", "application/x-www-form-urlencoded") resp, err := k.client.Do(req)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Jul 14 18:12:07 UTC 2024 - 4.6K bytes - Viewed (0) -
internal/config/policy/opa/config.go
Transport http.RoundTripper `json:"-"` CloseRespFn func(r io.ReadCloser) `json:"-"` } // Validate - validate opa 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 != "" {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jul 10 20:16:44 UTC 2024 - 5.3K bytes - Viewed (0) -
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.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 09 16:58:30 UTC 2024 - 27.7K bytes - Viewed (0) -
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, method string, u url.URL, body io.Reader) (*http.Request, error) { rc, ok := body.(io.ReadCloser) if !ok && body != nil { rc = io.NopCloser(body) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jul 26 12:55:01 UTC 2024 - 14.7K bytes - Viewed (0) -
internal/config/subnet/subnet.go
part, e := writer.CreateFormFile("file", filename) if e != nil { return "", e } if _, e = part.Write(payload); e != nil { return "", e } writer.Close() r, e := http.NewRequest(http.MethodPost, reqURL, &body) if e != nil { return "", e } r.Header.Add("Content-Type", writer.FormDataContentType()) return c.submitPost(r) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Feb 27 16:35:36 UTC 2023 - 2.9K bytes - Viewed (0) -
samples/compare/src/test/kotlin/okhttp3/compare/JettyHttpClientTest.kt
} @AfterEach fun tearDown() { client.stop() } @Test fun get(server: MockWebServer) { 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 Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2K bytes - Viewed (0)