feat(ancpi): test EditCartItemJson + SearchEstate with AJAX headers
This commit is contained in:
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user