MCPcopy Create free account
hub / github.com/cli/cli / setHeaders

Method setHeaders

internal/codespaces/api/api.go:1293–1295  ·  view source on GitHub ↗

setHeaders sets the required headers for the API.

(req *http.Request)

Source from the content-addressed store, hash-verified

1291
1292// setHeaders sets the required headers for the API.
1293func (a *API) setHeaders(req *http.Request) {
1294 req.Header.Set("Accept", "application/vnd.github.v3+json")
1295}
1296
1297// withRetry takes a generic function that sends an http request and retries
1298// only when the returned response has a >=500 status code.

Callers 15

GetUserMethod · 0.95
GetRepositoryMethod · 0.95
ListCodespacesMethod · 0.95
GetOrgMemberCodespaceMethod · 0.95
GetCodespaceMethod · 0.95
StartCodespaceMethod · 0.95
StopCodespaceMethod · 0.95
GetCodespacesMachinesMethod · 0.95
startCreateMethod · 0.95

Calls 1

SetMethod · 0.65

Tested by

no test coverage detected