fernandoslim / odoo-jsonrpc

A lightweight Odoo JSON-RPC client with zero dependencies.
9 stars 3 forks source link

"Cookie not found in response headers" error when doing `connect()` #1

Closed totzk9 closed 5 months ago

totzk9 commented 5 months ago
const response = await fetch(endpoint, {
            method: 'POST',
            headers: {
                'Content-Type': 'application/json',
                'X-Openerp-Session-Id': this.session_id,
            },
            body: JSON.stringify(data),
        });
if (!response.ok) {
     throw new Error(response.statusText);
}
const cookies = response.headers.get('set-cookie');

headers does not have set-cookie

totzk9 commented 5 months ago

Figured it out, should've used the account password instead of the APIkey for jsonRPC