MCPcopy Create free account
hub / github.com/bricks-cloud/BricksLLM / setHttpRequestAuthHeader

Function setHttpRequestAuthHeader

internal/route/route.go:674–681  ·  view source on GitHub ↗
(provider string, req *http.Request, key string)

Source from the content-addressed store, hash-verified

672}
673
674func setHttpRequestAuthHeader(provider string, req *http.Request, key string) {
675 if provider == "azure" {
676 req.Header.Set("api-key", key)
677 return
678 }
679
680 req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", key))
681}
682
683func (r *Request) createHttpRequest(ctx context.Context, provider string, runEmbeddings bool, params map[string]string, data []byte) (*http.Request, error) {
684 resourceName := ""

Callers 1

RunStepsMethod · 0.85

Calls 1

SetMethod · 0.65

Tested by

no test coverage detected