行为
Task #600
打开User story #594: Board live search
Javascript method for Ajax POST request
Task #600:
Javascript method for Ajax POST request
开始日期:
2026-03-16
计划完成日期:
2026-03-24 (截止日期到 11 天)
% 完成:
0%
预期时间:
14:00 小时
Company custom field:
Deals:
Contacts:
Checklist custom field:
- 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
Sprint:
Sprint #1 (3月04日 - 3月18日)
标签:
描述
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.
由 Smith Paul 更新于 7 天 之前
· 已编辑
- Checklist custom field 删除 (
Define the function signature (e.g., post(url, data, { headers, timeout })) and input validation) - Checklist custom field 删除 (
Implement fetch with Content-Type: application/json, JSON serialization, and CSRF token injection (if a meta tag or cookie exists)) - Checklist custom field 删除 (
Add error handling: treat non-2xx as errors, parse JSON safely with fallback, implement AbortController timeout, and retry once on network errors) - Checklist custom field 删除 (
Write unit tests with mocked fetch for success, 4xx/5xx, invalid JSON, timeout, and retry logic; ensure coverage) - Checklist custom field 删除 (
Document usage and caveats (CORS, CSRF, timeouts), provide example calls, and ensure linter/TypeScript typings if applicable) - Checklist custom field Define function signature and validate input 添加
- Checklist custom field Implement fetch with JSON and CSRF 添加
- Checklist custom field Add error handling and retry logic 添加
- Checklist custom field Write unit tests for all cases 添加
- Checklist custom field Document usage, examples, and types 添加
由 Smith Paul 更新于 7 天 之前
· 已编辑
- Checklist custom field Implement fetch with JSON and CSRF 设置完成
由 Smith Paul 更新于 大约 22 小时 之前
· 已编辑
- 标签 被设置为 frontend
由 Smith Paul 更新于 大约 22 小时 之前
· 已编辑
- Company custom field 被设置为 RedmineUP
由 Smith Paul 更新于 6 天 之前
· 已编辑
- 计划完成日期 被设置为 2019-12-24
- 开始日期 从 2019-12-20 变更为 2019-12-16
- 预期时间 从 4:00 小时 变更为 14:00 小时
由 Smith Paul 更新于 11 天 之前
· 已编辑
- 状态 从 New 变更为 In Progress
由 Smith Paul 更新于 11 天 之前
· 已编辑
- 指派给 被设置为 Stone Elizabeth
由 Smith Paul 更新于 12 天 之前
· 已编辑
- Checklist custom field Define the function signature (e.g., post(url, data, { headers, timeout })) and input validation 添加
- Checklist custom field Implement fetch with Content-Type: application/json, JSON serialization, and CSRF token injection (if a meta tag or cookie exists) 添加
- Checklist custom field Add error handling: treat non-2xx as errors, parse JSON safely with fallback, implement AbortController timeout, and retry once on network errors 添加
- Checklist custom field Write unit tests with mocked fetch for success, 4xx/5xx, invalid JSON, timeout, and retry logic; ensure coverage 添加
- Checklist custom field Document usage and caveats (CORS, CSRF, timeouts), provide example calls, and ensure linter/TypeScript typings if applicable 添加
- 描述 已更新。 (差异)
行为