Add comments section for function

This commit is contained in:
2023-11-01 14:04:51 +07:00
parent 12a43f31c0
commit aaef0971ef
3 changed files with 74 additions and 3 deletions
@@ -6,6 +6,13 @@ import { TResponse } from '../globals/types';
type TMethodRequest = 'GET' | 'POST' | 'PUT' | 'DELETE';
/**
* The send request method to the server
* @param path The path of URL
* @param body The content will push on
* @param method HTTP method
* @returns The status code and message from server
*/
export const sendRequest = async (
path: string,
body: BodyInit | null | undefined,