@bachman-dev/wanikani-api-types - v2.0.0
    Preparing search index...

    Interface ApiRequestHeaders

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

    interface ApiRequestHeaders {
        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]: undefined | string;
    }

    Indexable

    • [customHeaders: string]: undefined | 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.