MCPcopy Create free account
hub / github.com/cloudfoundry/credhub-cli / Request

Method Request

credhub/request.go:24–26  ·  view source on GitHub ↗

Request sends an authenticated request to the CredHub server. The pathStr should include the full path (eg. /api/v1/data). The request body should be marshallable to JSON, but can be left nil for GET requests. Request() is used by other CredHub client methods to send authenticated requests to the

(method string, pathStr string, query url.Values, body interface{}, checkServerErr bool)

Source from the content-addressed store, hash-verified

22// Use Request() directly to send authenticated requests to the CredHub server.
23// For unauthenticated requests (eg. /health), use Config.Client() instead.
24func (ch *CredHub) Request(method string, pathStr string, query url.Values, body interface{}, checkServerErr bool) (*http.Response, error) {
25 return ch.request(ch.Auth, method, pathStr, query, body, checkServerErr)
26}
27
28type requester interface {
29 Do(req *http.Request) (*http.Response, error)

Callers 15

findMethod · 0.95
RegenerateMethod · 0.95
setCredentialMethod · 0.95
BulkRegenerateMethod · 0.95
DeleteMethod · 0.95
generateCredentialMethod · 0.95
GetPermissionsMethod · 0.95
GetPermissionByUUIDMethod · 0.95
addV1PermissionMethod · 0.95
addV2PermissionMethod · 0.95
UpdatePermissionMethod · 0.95

Calls 1

requestMethod · 0.95

Tested by 1

ExampleCredHub_RequestFunction · 0.64