MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / handleRoot

Method handleRoot

rest/api.go:58–75  ·  view source on GitHub ↗

HTTP handler for the root ("/")

()

Source from the content-addressed store, hash-verified

56
57// HTTP handler for the root ("/")
58func (h *handler) handleRoot() error {
59 resp := rootResponse{
60 Admin: h.serverType == adminServer,
61 CouchDB: "Welcome",
62 Vendor: vendor{
63 Name: base.ProductNameString,
64 },
65 PersistentConfig: h.server.persistentConfig,
66 }
67
68 if h.shouldShowProductVersion() {
69 resp.Version = base.LongVersionString
70 resp.Vendor.Version = base.ProductAPIVersion
71 }
72
73 h.writeJSON(resp)
74 return nil
75}
76
77// HTTP handler for a simple ping healthcheck
78func (h *handler) handlePing() error {

Callers

nothing calls this directly

Calls 2

writeJSONMethod · 0.95

Tested by

no test coverage detected