iya-sts
    Preparing search index...
    Index
    • Answers a refusal made before any route in the shape of the API the path belongs to. The caller has marked the response with its code already.

      Parameters

      • req: any

        the request

      • res: any

        the response

      • status: number

        the HTTP status

      • sentence: string

        what the caller is told, with no code in it

      • Optionalrefused: Refused

        the part refused, and a 429's wait

      Returns boolean

      true where it answered; false for a path that answers as before, which the caller then answers as it always did

    • The body and media type a surface answers one refusal with. Separate from answer() so a test can hold each shape with no response.

      Parameters

      • surface: string

        a name surfaceOf() gives

      • status: number

        the HTTP status

      • sentence: string

        what the caller is told, in English, with no code

      • Optionalrefused: Refused

        the part refused, and a 429's wait

      Returns { body: string; type: string }

      { type, body }, the body already a string

    • Names the API a path belongs to, where that API answers a refusal in a shape of its own.

      Parameters

      • path: string

        the request's path, after the realm's prefix came off

      Returns string

      the surface's name, or '' for a path that answers as before