MCPcopy Index your code
hub / github.com/massCodeIO/massCode / getHttpSuggestedName

Function getHttpSuggestedName

integrations/clipper/src/api.ts:183–194  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

181}
182
183function getHttpSuggestedName(url: string): string {
184 try {
185 const parsedUrl = new URL(url)
186 const path
187 = parsedUrl.pathname === '/' ? parsedUrl.hostname : parsedUrl.pathname
188
189 return `GET ${path}`
190 }
191 catch {
192 return 'GET request'
193 }
194}
195
196async function getErrorMessage(response: Response): Promise<string> {
197 try {

Callers 2

buildCaptureRequestFunction · 0.85
getCaptureNameSuggestionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected