Class Client

Contains a fetch instance, provides methods to GET and POST several types

Hierarchy

  • Client

Constructors

  • Parameters

    • Optional fetchOverride: ((input: URL | RequestInfo, init?: RequestInit) => Promise<Response>)
        • (input: URL | RequestInfo, init?: RequestInit): Promise<Response>
        • Parameters

          • input: URL | RequestInfo
          • Optional init: RequestInit

          Returns Promise<Response>

    Returns Client

Properties

__fetchOverride?: ((input: URL | RequestInfo, init?: RequestInit) => Promise<Response>)

Type declaration

    • (input: URL | RequestInfo, init?: RequestInit): Promise<Response>
    • Parameters

      • input: URL | RequestInfo
      • Optional init: RequestInit

      Returns Promise<Response>

Accessors

  • get fetch(): ((input: URL | RequestInfo, init?: RequestInit) => Promise<Response>)
  • Returns ((input: URL | RequestInfo, init?: RequestInit) => Promise<Response>)

      • (input: URL | RequestInfo, init?: RequestInit): Promise<Response>
      • Parameters

        • input: URL | RequestInfo
        • Optional init: RequestInit

        Returns Promise<Response>

Methods

  • Parameters

    • fetchOverride: ((input: URL | RequestInfo, init?: RequestInit) => Promise<Response>)
        • (input: URL | RequestInfo, init?: RequestInit): Promise<Response>
        • Parameters

          • input: URL | RequestInfo
          • Optional init: RequestInit

          Returns Promise<Response>

    Returns void

  • Uploads files to the /upload endpoint of the Store. Signs the Headers using the given agent. Returns the newly created resources

    Parameters

    • files: File[]
    • serverUrl: string
    • agent: Agent
    • parent: string

    Returns Promise<Resource[]>

  • Returns true if the given subject is valid

    Parameters

    • subject: undefined | string

    Returns boolean

  • Removes query params from the URL if it can build a URL. Will return the normal URL if things go wrong.

    Parameters

    • subject: string

    Returns string

  • Throws an error if the subject is not valid

    Parameters

    • subject: undefined | string

    Returns void

Generated using TypeDoc