(url: string, options: EoRequest, shouldTransformKeys: boolean)
| 99 | } |
| 100 | |
| 101 | const 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 | |
| 115 | const processRequestBody = (options: EoRequest, headers: EoHeaders, shouldTransformKeys: boolean) => { |
| 116 | let newBody: { [k: string]: unknown } | undefined |
no test coverage detected