Actions
Task #600
openUser story #594: Board live search
Javascript method for Ajax POST request
Task #600:
Javascript method for Ajax POST request
Start date:
01/16/2026
Due date:
01/24/2026 (6 days late)
% Done:
0%
Estimated time:
14:00 h
Company custom field:
Deals:
Contacts:
Sprint:
Sprint #1 (Jan 04 - Jan 18)
Tags:
Description
Build a reusable JavaScript method to perform an AJAX POST request using fetch, sending JSON payloads and handling CSRF tokens when required. The method should validate inputs, set correct headers, and serialize/deserialize JSON safely. It must implement robust error handling for non-2xx responses, network failures, and timeouts, returning a clear, Promise-based result. Include concise documentation and examples so it can be dropped into any project with minimal setup.
Updated by Smith Paul 24 days ago
· Edited
- Checklist custom field changed from [-] Define the function signature (e.g., post(url, data, { headers, timeout })) and input validation [-] Implement fetch with Content-Type: application/json, JSON serialization, and CSRF token injection (if a meta tag or cookie exists) [-] Add error handling: treat non-2xx as errors, parse JSON safely with fallback, implement AbortController timeout, and retry once on network errors [-] Write unit tests with mocked fetch for success, 4xx/5xx, invalid JSON, timeout, and retry logic; ensure coverage [-] Document usage and caveats (CORS, CSRF, timeouts), provide example calls, and ensure linter/TypeScript typings if applicable to [-] Define function signature and validate input [-] Implement fetch with JSON and CSRF [-] Add error handling and retry logic [-] Write unit tests for all cases [-] Document usage, examples, and types
Updated by Smith Paul 24 days ago
· Edited
- Checklist custom field changed from [-] Define function signature and validate input [-] Implement fetch with JSON and CSRF [-] Add error handling and retry logic [-] Write unit tests for all cases [-] Document usage, examples, and types to [-] Define function signature and validate input [+] Implement fetch with JSON and CSRF [-] Add error handling and retry logic [-] Write unit tests for all cases [-] Document usage, examples, and types
Updated by Smith Paul 19 days ago
· Edited
- Tags set to frontend
Updated by Smith Paul 19 days ago
· Edited
- Company custom field set to RedmineUP
Updated by Smith Paul 11 days ago
· Edited
- Due date set to 12/24/2019
- Start date changed from 12/20/2019 to 12/16/2019
- Estimated time changed from 4:00 h to 14:00 h
Updated by Smith Paul 6 days ago
· Edited
- Status changed from New to In Progress
Updated by Smith Paul 6 days ago
· Edited
- Assignee set to Stone Elizabeth
Updated by Smith Paul 5 days ago
· Edited
- Description updated (diff)
- Checklist custom field set to [-] Define the function signature (e.g., post(url, data, { headers, timeout })) and input validation [-] Implement fetch with Content-Type: application/json, JSON serialization, and CSRF token injection (if a meta tag or cookie exists) [-] Add error handling: treat non-2xx as errors, parse JSON safely with fallback, implement AbortController timeout, and retry once on network errors [-] Write unit tests with mocked fetch for success, 4xx/5xx, invalid JSON, timeout, and retry logic; ensure coverage [-] Document usage and caveats (CORS, CSRF, timeouts), provide example calls, and ensure linter/TypeScript typings if applicable
Actions