AniLink - v3.0.0
    Preparing search index...

    Function getResponseContentType

    • Reads the Content-Type of a response, trying the lowercase content-type header key first and the canonical Content-Type spelling second.

      The value stamps AniLinkApiError.contentType so consumers can tell a structured JSON failure payload from an HTML or plain-text one without guessing.

      Parameters

      • headers: Record<string, unknown> | undefined

        The response headers, when available.

      Returns string | undefined

      The raw Content-Type value, or undefined when absent or not a string.