mirror of
https://github.com/Nezumi-2711/react-training.git
synced 2026-09-22 20:01:59 +00:00
Add comments section for function
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user