summaryrefslogtreecommitdiffstats
path: root/src/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'src/hooks')
-rw-r--r--src/hooks/useRequests.tsx10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/hooks/useRequests.tsx b/src/hooks/useRequests.tsx
index cb85162..204877a 100644
--- a/src/hooks/useRequests.tsx
+++ b/src/hooks/useRequests.tsx
@@ -1,15 +1,12 @@
1import {useCallback, useEffect, useMemo, useState} from "react"; 1import {useCallback, useEffect, useMemo, useState} from "react";
2import {getHost} from "../utils"; 2import {getHost} from "../utils";
3 3
4type Dict = { 4export type Headers = [string, string][]
5 [key: string]: string
6}
7 5
8export interface RequestPayload { 6export interface RequestPayload {
9 id: string 7 id: string
10 body: string 8 body: string
11 cookies: Dict 9 headers: Headers
12 headers: Dict
13 method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' 10 method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH'
14 path: string 11 path: string
15} 12}
@@ -23,8 +20,7 @@ export interface ResponsePayload {
23 id: string 20 id: string
24 timing: number 21 timing: number
25 body: string 22 body: string
26 cookies: Dict 23 headers: Headers
27 headers: Dict
28 status: number 24 status: number
29} 25}
30 26