Pebble App Framework: Phone API
    Preparing search index...

    Function heardRequest

    • Wraps a request so a send hook hears it go out, and hears how it answered.

      Parameters

      • get: RequestFn

        The HTTP GET to wrap, which should answer once and never throw, as guardRequest makes it.

      • onSend: SendHook | undefined

        The hook, or undefined for none, which hands back get as it is.

      • send: ReadingSend

        What the request counts as.

      Returns RequestFn

      The GET, telling the hook about each request.