MCPcopy
hub / github.com/elastic/go-elasticsearch / Status

Method Status

esapi/esapi.response.go:82–90  ·  view source on GitHub ↗

Status returns the response status as a string.

()

Source from the content-addressed store, hash-verified

80
81// Status returns the response status as a string.
82func (r *Response) Status() string {
83 var b strings.Builder
84 if r != nil {
85 b.WriteString(strconv.Itoa(r.StatusCode))
86 b.WriteString(" ")
87 b.WriteString(http.StatusText(r.StatusCode))
88 }
89 return b.String()
90}
91
92// IsError returns true when the response status indicates failure.
93func (r *Response) IsError() bool {

Callers 3

ExampleResponse_IsErrorFunction · 0.45
ExampleResponse_StatusFunction · 0.45
TestAPIResponseFunction · 0.45

Calls 1

StringMethod · 0.45

Tested by 3

ExampleResponse_IsErrorFunction · 0.36
ExampleResponse_StatusFunction · 0.36
TestAPIResponseFunction · 0.36