MCPcopy Create free account
hub / github.com/alibaba/loongcollector / BadRequest

Function BadRequest

plugins/input/httpserver/input_http_server.go:225–229  ·  view source on GitHub ↗
(res http.ResponseWriter)

Source from the content-addressed store, hash-verified

223}
224
225func BadRequest(res http.ResponseWriter) {
226 res.Header().Set("Content-Type", "application/json")
227 res.WriteHeader(http.StatusBadRequest)
228 _, _ = res.Write([]byte(`{"error":"http: bad request"}`))
229}
230
231// Start starts the ServiceInput's service, whatever that may be
232func (s *ServiceHTTP) Start(c pipeline.Collector) error {

Callers 5

handleInvalidRequestFunction · 0.92
ServeHTTPMethod · 0.85

Calls 2

SetMethod · 0.65
WriteMethod · 0.45

Tested by

no test coverage detected