@salesforce/agents
    Preparing search index...

    Class MaybeMock

    A class to act as an in-between the library's request, and the orgs response

    if SF_MOCK_DIR is set it will read from the directory, resolving files as API responses with nock

    if it is NOT set, it will hit the endpoint and use real server responses

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Will either use mocked responses, or the real server response, as the library/APIs become more feature complete, there will be fewer mocks and more real responses

      Type Parameters

      • T extends Body

      Parameters

      • method: "GET" | "POST" | "DELETE"
      • url: string
      • body: RequestBodyMatcher = {}
      • headers: HttpHeaders = {}

      Returns Promise<T>