- Sort Score
- Result 10 results
- Languages All
Results 141 - 150 of 208 for readFull (0.22 sec)
-
pkg/test/echo/server/forwarder/http.go
echo.WriteError(outBuffer, requestID, err) } }() echo.StatusCodeField.WriteForRequest(outBuffer, requestID, strconv.Itoa(httpResp.StatusCode)) // Read the entire body. data, err := io.ReadAll(httpResp.Body) if err != nil { return err } // Write the response headers to the output buffer. var keys []string for k := range httpResp.Header { keys = append(keys, k) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Apr 30 13:56:46 UTC 2024 - 7.9K bytes - Viewed (0) -
cmd/object-handlers_test.go
if rec.Code != testCase.expectedRespStatus { b, _ := io.ReadAll(rec.Body) t.Fatalf("Test %d: Expected the response status to be `%d`, but instead found `%d`: %s", i, testCase.expectedRespStatus, rec.Code, string(b)) } if testCase.expectedRespStatus != http.StatusOK { b, err := io.ReadAll(rec.Body) if err != nil { t.Fatal(err) } var apiErr APIErrorResponse
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Jun 10 15:50:49 UTC 2024 - 161.9K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/telemetry/internal/crashmonitor/monitor.go
// It expects its stdin to be connected via a pipe to the parent which has // run Parent. func Child() { // Wait for parent process's dying gasp. // If the parent dies for any reason this read will return. data, err := io.ReadAll(os.Stdin) if err != nil { log.Fatalf("failed to read from input pipe: %v", err) } // If the only line is the sentinel, it wasn't a crash. if bytes.Count(data, []byte("\n")) < 2 { childExitHook()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:57:25 UTC 2024 - 7.6K bytes - Viewed (0) -
samples/extauthz/cmd/extauthz/main.go
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Feb 15 18:23:48 UTC 2024 - 10.4K bytes - Viewed (0) -
src/net/http/readrequest_test.go
` + "\t" + `Host: foo`)}, } func TestReadRequest_Bad(t *testing.T) { for _, tt := range badRequestTests { got, err := ReadRequest(bufio.NewReader(bytes.NewReader(tt.req))) if err == nil { all, err := io.ReadAll(got.Body) t.Errorf("%s: got unexpected request = %#v\n Body = %q, %v", tt.name, got, all, err) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Feb 14 22:23:32 UTC 2024 - 10K bytes - Viewed (0) -
src/net/http/request_test.go
continue } slurp1, err := io.ReadAll(req.Body) if err != nil { t.Errorf("test[%d]: ReadAll(Body) = %v", i, err) } newBody, err := req.GetBody() if err != nil { t.Errorf("test[%d]: GetBody = %v", i, err) } slurp2, err := io.ReadAll(newBody) if err != nil { t.Errorf("test[%d]: ReadAll(GetBody()) = %v", i, err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 18:42:34 UTC 2024 - 44K bytes - Viewed (0) -
cmd/kubeadm/app/util/version.go
resp, err := client.Get(url) if err != nil { return "", errors.Errorf("unable to get URL %q: %s", url, err.Error()) } defer resp.Body.Close() body, err := io.ReadAll(resp.Body) if err != nil { return "", errors.Errorf("unable to read content of URL %q: %s", url, err.Error()) } bodyString := strings.TrimSpace(string(body)) if resp.StatusCode != http.StatusOK {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Apr 23 10:50:19 UTC 2024 - 9.5K bytes - Viewed (0) -
cmd/signature-v4-utils.go
} return false } // Returns SHA256 for calculating canonical-request. func getContentSha256Cksum(r *http.Request, stype serviceType) string { if stype == serviceSTS { payload, err := io.ReadAll(io.LimitReader(r.Body, stsRequestBodyLimit)) if err != nil { logger.CriticalIf(GlobalContext, err) } sum256 := sha256.Sum256(payload) r.Body = io.NopCloser(bytes.NewReader(payload))
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Thu Jun 13 22:26:38 UTC 2024 - 9.1K bytes - Viewed (0) -
src/cmd/pprof/pprof.go
} func statusCodeError(resp *http.Response) error { if resp.Header.Get("X-Go-Pprof") != "" && strings.Contains(resp.Header.Get("Content-Type"), "text/plain") { // error is from pprof endpoint if body, err := io.ReadAll(resp.Body); err == nil { return fmt.Errorf("server response: %s - %s", resp.Status, body) } } return fmt.Errorf("server response: %s", resp.Status) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 9.5K bytes - Viewed (0) -
src/cmd/vendor/github.com/google/pprof/profile/profile.go
// may be a gzip-compressed encoded protobuf or one of many legacy // profile formats which may be unsupported in the future. func Parse(r io.Reader) (*Profile, error) { data, err := io.ReadAll(r) if err != nil { return nil, err } return ParseData(data) } // ParseData parses a profile from a buffer and checks for its // validity. func ParseData(data []byte) (*Profile, error) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 31 19:48:28 UTC 2024 - 22.3K bytes - Viewed (0)