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

Function WithResponseBody

_examples/interceptor/internal/fake/server.go:51–55  ·  view source on GitHub ↗

WithResponseBody sets the response body returned by the server.

(body []byte)

Source from the content-addressed store, hash-verified

49
50// WithResponseBody sets the response body returned by the server.
51func WithResponseBody(body []byte) Option {
52 return func(c *Config) {
53 c.ResponseBody = body
54 }
55}
56
57// WithStatusCode sets the HTTP status code returned by the server.
58func WithStatusCode(code int) Option {

Callers 4

mainFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected