Tsarr Documentation - v2.11.0
    Preparing search index...

    Type Alias AuthLoginPostData

    type AuthLoginPostData = {
        body: { username: string; password: string };
        headers?: { Referer?: string; Origin?: string };
        path?: never;
        query?: never;
        url: "/auth/login";
    }
    Index

    Properties

    body: { username: string; password: string }

    Example showing how to login and execute a command that requires authentication using curl:

    $ curl -i --header 'Referer: http://localhost:8080' --data 'username=admin&password=adminadmin' http://localhost:8080/api/v2/auth/login
    HTTP/1.1 200 OK
    Content-Encoding:
    Content-Length: 3
    Content-Type: text/plain; charset=UTF-8
    Set-Cookie: SID=hBc7TxF76ERhvIw0jQQ4LZ7Z1jQUV0tQ; path=/
    $ curl http://localhost:8080/api/v2/torrents/info --cookie "SID=hBc7TxF76ERhvIw0jQQ4LZ7Z1jQUV0tQ"

    Note: Set Referer or Origin header to the exact same domain and port as used in the HTTP query Host header.

    headers?: { Referer?: string; Origin?: string }
    path?: never
    query?: never
    url: "/auth/login"