feat(ancpi): test EditCartItemJson + SearchEstate with AJAX headers

This commit is contained in:
AI Assistant
2026-03-23 01:42:43 +02:00
parent 665a51d794
commit 23bddf6752
2 changed files with 52 additions and 52 deletions
@@ -256,6 +256,22 @@ export class EpayClient {
return String(response.data ?? "");
}
/* ── Raw POST (for endpoint discovery) ──────────────────── */
// eslint-disable-next-line @typescript-eslint/no-explicit-any
async postRaw(url: string, body: string, extraHeaders?: Record<string, string>): Promise<any> {
const response = await this.client.post(url, body, {
headers: {
"Content-Type": "application/x-www-form-urlencoded",
...extraHeaders,
},
timeout: DEFAULT_TIMEOUT_MS,
maxRedirects: 5,
validateStatus: () => true,
});
return response.data;
}
/* ── Credits ───────────────────────────────────────────────── */
async getCredits(): Promise<number> {