MCPcopy Index your code
hub / github.com/dnote/dnote / doAuthorizedReq

Function doAuthorizedReq

pkg/cli/client/client.go:199–205  ·  view source on GitHub ↗

doAuthorizedReq does a http request to the given path in the api endpoint as a user, with the appropriate headers. The given path should include the preceding slash.

(ctx context.DnoteCtx, method, path, body string, options *requestOptions)

Source from the content-addressed store, hash-verified

197// doAuthorizedReq does a http request to the given path in the api endpoint as a user,
198// with the appropriate headers. The given path should include the preceding slash.
199func doAuthorizedReq(ctx context.DnoteCtx, method, path, body string, options *requestOptions) (*http.Response, error) {
200 if ctx.SessionKey == "" {
201 return nil, errors.New("no session key found")
202 }
203
204 return doReq(ctx, method, path, body, options)
205}
206
207// GetSyncStateResp is the response get sync state endpoint
208type GetSyncStateResp struct {

Callers 10

GetSyncStateFunction · 0.85
GetSyncFragmentFunction · 0.85
CreateBookFunction · 0.85
UpdateBookFunction · 0.85
DeleteBookFunction · 0.85
CreateNoteFunction · 0.85
UpdateNoteFunction · 0.85
DeleteNoteFunction · 0.85
GetBooksFunction · 0.85
SignoutFunction · 0.85

Calls 2

doReqFunction · 0.85
NewMethod · 0.80

Tested by

no test coverage detected