(body: string)
| 692 | } |
| 693 | |
| 694 | function parseTokenBody(body: string): Record<string, string> { |
| 695 | const trimmed = body.trim() |
| 696 | if (trimmed.startsWith('{')) { |
| 697 | return parseJsonObject(body) |
| 698 | } |
| 699 | return parseFormBody(body) |
| 700 | } |
| 701 | |
| 702 | function parseJsonObject(body: string): Record<string, string> { |
| 703 | return JSON.parse(body || '{}') as Record<string, string> |
no test coverage detected