MCPcopy Index your code
hub / github.com/cli/cli / setHeaders

Method setHeaders

internal/codespaces/api/api.go:1199–1201  ·  view source on GitHub ↗

setHeaders sets the required headers for the API.

(req *http.Request)

Source from the content-addressed store, hash-verified

1197
1198// setHeaders sets the required headers for the API.
1199func (a *API) setHeaders(req *http.Request) {
1200 req.Header.Set("Accept", "application/vnd.github.v3+json")
1201}
1202
1203// withRetry takes a generic function that sends an http request and retries
1204// 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