@bachman-dev/wanikani-api-types - v1.8.0
    Preparing search index...

    Interface WKRequestHeaders

    Generally expected HTTP headers when making requests to the WaniKani API.

    interface WKRequestHeaders {
        Authorization: `Bearer ${string}`;
        "Wanikani-Revision": "20170710";
        Accept?: "application/json";
        "Content-Type"?: "application/json";
        "If-Modified-Since"?: string;
        "If-None-Match"?: string;
        "User-Agent"?: string;
        [customHeaders: string]: string;
    }

    Indexable

    • [customHeaders: string]: string
    Index

    Properties

    Authorization: `Bearer ${string}`

    HTTP Authorization header, using a Bearer Token.

    "Wanikani-Revision": "20170710"

    The WaniKani API Revision.

    Accept?: "application/json"

    The client should accept JSON as that is how the WaniKani API's response bodies are formatted.

    "Content-Type"?: "application/json"

    When making a POST or PUT request, the client should indicate they are sending a JSON request body.

    "If-Modified-Since"?: string

    An HTTP Date can be sent to check for data changes, and expect an HTTP Status 304 if there are none.

    "If-None-Match"?: string

    An HTTP ETag can be sent to check for data changes, and expect an HTTP Status 304 if there are none.

    "User-Agent"?: string

    A User Agent to better identify who is making the request to the WaniKani API.