MCPcopy Create free account
hub / github.com/scalar/scalar / parseRequestUrl

Function parseRequestUrl

packages/snippetz/src/plugins/python/python3/python3.ts:18–28  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

16}
17
18const parseRequestUrl = (url: string): URL => {
19 if (!url) {
20 return new URL('https://example.com')
21 }
22
23 try {
24 return new URL(url)
25 } catch {
26 return new URL(url, 'https://example.com')
27 }
28}
29
30const mergeQueryString = (url: URL, queryString: HarRequest['queryString'] = []): string => {
31 if (!queryString.length) {

Callers 1

generateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected