MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / processQueryParams

Function processQueryParams

frontend/packages/common/src/hooks/http.ts:101–113  ·  view source on GitHub ↗
(url: string, options: EoRequest, shouldTransformKeys: boolean)

Source from the content-addressed store, hash-verified

99}
100
101const processQueryParams = (url: string, options: EoRequest, shouldTransformKeys: boolean) => {
102 if (options.eoParams) {
103 const cleanParams = Object.fromEntries(
104 Object.entries(options.eoParams)
105 .filter(([, value]) => value !== undefined)
106 .map(([key, value]) => [key, typeof value === 'string' ? value.trim() : value])
107 )
108 const queryParams = convertQueryParamsToSnake(cleanParams, shouldTransformKeys, options.eoTransformKeys as string[])
109 const queryString = queryParams.toString()
110 url += (url.includes('?') ? '&' : '?') + queryString // 添加查询字符串到URL
111 }
112 return url
113}
114
115const processRequestBody = (options: EoRequest, headers: EoHeaders, shouldTransformKeys: boolean) => {
116 let newBody: { [k: string]: unknown } | undefined

Callers 1

fetchDataFunction · 0.85

Calls 2

toStringMethod · 0.45

Tested by

no test coverage detected