MCPcopy
hub / github.com/lektor/lektor / get

Function get

frontend/js/fetch.ts:135–141  ·  view source on GitHub ↗
(
  endpoint: T,
  params: GetAPIParams[T]
)

Source from the content-addressed store, hash-verified

133 * @param json - Possible JSON body of the request.
134 */
135export function get<T extends keyof GetAPIReturns>(
136 endpoint: T,
137 params: GetAPIParams[T]
138): Promise<GetAPIReturns[T]> {
139 const url = apiUrl(endpoint, params);
140 return fetchJSON(url, "GET") as Promise<GetAPIReturns[T]>;
141}
142
143/**
144 * Execute a POST api request.

Callers 11

onIntervalFunction · 0.90
SidebarFunction · 0.90
usePreviewUrlFunction · 0.90
PreviewPageFunction · 0.90
AddAttachmentPageFunction · 0.90
AddChildPageFunction · 0.90
DeletePageFunction · 0.90
EditPageFunction · 0.90
BreadCrumbsFunction · 0.90
GlobalActionsFunction · 0.90
PublishFunction · 0.90

Calls 2

apiUrlFunction · 0.85
fetchJSONFunction · 0.85

Tested by

no test coverage detected