MCPcopy
hub / github.com/promptfoo/promptfoo / getRequestUrlString

Function getRequestUrlString

src/util/fetch/monkeyPatchFetch.ts:25–27  ·  view source on GitHub ↗
(url: string | URL | Request)

Source from the content-addressed store, hash-verified

23
24/** Extracts the request URL as a string. A `Request`'s `toString()` is "[object Request]", so read `.url`. */
25export function getRequestUrlString(url: string | URL | Request): string {
26 return url instanceof Request ? url.url : url.toString();
27}
28
29function matchesNoLogUrl(url: string, noLogUrl: string): boolean {
30 try {

Callers 4

fetchAndReadBodyFunction · 0.90
isPromptfooCloudTaskUrlFunction · 0.85
monkeyPatchFetchFunction · 0.85

Calls 1

toStringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…