MCPcopy
hub / github.com/alibaba/anyproxy / generateUrl

Function generateUrl

test/util/HttpUtil.js:267–269  ·  view source on GitHub ↗

* generate the final url based on protocol and path *

(protocol, urlPath)

Source from the content-addressed store, hash-verified

265*
266*/
267function generateUrl(protocol, urlPath) {
268 return protocol === 'http' ? HTTP_SERVER_BASE + urlPath : HTTPS_SERVER_BASE + urlPath;
269}
270
271function generateWsUrl(protocol, urlPath) {
272 return protocol === 'wss' ? WSS_SERVER_BASE + urlPath : WS_SERVER_BASE + urlPath;

Callers 8

testWrapperFunction · 0.85
testWrapperFunction · 0.85
testWrapperFunction · 0.85
testWrapperFunction · 0.85
testWrapperFunction · 0.85
testWrapperFunction · 0.85
constructUrlFunction · 0.85
testWrapperFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected