( endpoint: string, body?: Record<string, unknown> | string, headers?: Record<string, string>, )
| 135 | * Convenience function for POST requests |
| 136 | */ |
| 137 | export async function post<T = any>( |
| 138 | endpoint: string, |
| 139 | body?: Record<string, unknown> | string, |
| 140 | headers?: Record<string, string>, |
| 141 | ): Promise<ApiResponse<T>> { |
| 142 | return makeAuthenticatedRequest<T>(endpoint, { |
| 143 | method: "POST", |
| 144 | body, |
| 145 | headers, |
| 146 | }); |
| 147 | } |
| 148 | |
| 149 | /** |
| 150 | * Convenience function for PUT requests |
no test coverage detected