MCPcopy Create free account
hub / github.com/modelcontextprotocol/go-sdk / getBaseURL

Function getBaseURL

oauthex/oauthex_test.go:250–256  ·  view source on GitHub ↗

getBaseURL constructs the base URL (scheme://host) from the request.

(r *http.Request)

Source from the content-addressed store, hash-verified

248
249// getBaseURL constructs the base URL (scheme://host) from the request.
250func getBaseURL(r *http.Request) string {
251 scheme := "http"
252 if r.TLS != nil {
253 scheme = "https"
254 }
255 return scheme + "://" + r.Host
256}

Callers 4

handleMCPMethod · 0.85
handleServerMetadataMethod · 0.85
handleTokenMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…