MCPcopy Create free account
hub / github.com/massCodeIO/massCode / applyQueryToUrl

Function applyQueryToUrl

src/renderer/composables/spaces/http/urlQuery.ts:50–56  ·  view source on GitHub ↗
(
  url: string,
  query: HttpUrlQueryItem[],
)

Source from the content-addressed store, hash-verified

48}
49
50export function applyQueryToUrl(
51 url: string,
52 query: HttpUrlQueryItem[],
53): string {
54 const parts = splitUrl(url)
55 return combineUrl({ ...parts, query: buildQueryString(query) })
56}
57
58export function getDisplayUrl(url: string, query: HttpUrlQueryItem[]): string {
59 return query.length > 0 ? applyQueryToUrl(url, query) : url

Callers 3

useHttpRequests.tsFile · 0.90
urlQuery.test.tsFile · 0.90
getDisplayUrlFunction · 0.85

Calls 3

combineUrlFunction · 0.85
splitUrlFunction · 0.70
buildQueryStringFunction · 0.70

Tested by

no test coverage detected