Fetches a CSRF token from an OData service using a HEAD request.
Playwright Page with request API (or compatible subset).
The OData service root URL.
The CSRF token and service URL.
ODataError if the token cannot be fetched.
const { token } = await fetchCSRFToken(page, '/sap/opu/odata/sap/API_PRODUCT_SRV/'); Copy
const { token } = await fetchCSRFToken(page, '/sap/opu/odata/sap/API_PRODUCT_SRV/');
Fetches a CSRF token from an OData service using a HEAD request.