MCPcopy Create free account
hub / github.com/algolia/cli / setAPIHeaders

Method setAPIHeaders

api/dashboard/client.go:644–647  ·  view source on GitHub ↗
(req *http.Request, accessToken string)

Source from the content-addressed store, hash-verified

642}
643
644func (c *Client) setAPIHeaders(req *http.Request, accessToken string) {
645 req.Header.Set("Authorization", "Bearer "+accessToken)
646 req.Header.Set("Accept", "application/vnd.api+json")
647}
648
649func parseOAuthError(resp *http.Response, context string) error {
650 body, err := io.ReadAll(resp.Body)

Callers 10

ListApplicationsMethod · 0.95
GetApplicationMethod · 0.95
CreateApplicationMethod · 0.95
UpdateApplicationMethod · 0.95
GetSelfServePlansMethod · 0.95
GetUserMethod · 0.95
ChangeApplicationPlanMethod · 0.95
ListRegionsMethod · 0.95
CreateAPIKeyMethod · 0.95
GetCrawlerUserMethod · 0.95

Calls 1

SetMethod · 0.45

Tested by

no test coverage detected