Member Junction
    Preparing search index...
    • HttpRequest with the SSRF guard switched on — equivalent to passing ValidateUrl: true, but named so a reviewer can see at a glance that the call site handles an untrusted URL.

      Use this (or set ValidateUrl explicitly) wherever the URL can be influenced by an AI agent, an Action parameter, an API caller, or stored data those can write. Prefer SafeFetch when you want the raw Response rather than a parsed body.

      Type Parameters

      • T = unknown

        the expected shape of the parsed response body.

      Parameters

      Returns Promise<HttpResponse<T>>

      the HttpResponse.

      when the URL, or any redirect hop, resolves to a private or reserved address.

      on a non-2xx status, timeout, cancellation, or transport failure.

      try {
      const response = await SafeHttpRequest({ Url: userSuppliedUrl });
      return response.Data;
      } catch (error) {
      if (error instanceof SSRFError) {
      return { Success: false, ResultCode: 'SSRF_BLOCKED' };
      }
      throw error;
      }