diff options
| author | 2022-02-07 22:05:04 +0100 | |
|---|---|---|
| committer | 2022-02-07 22:05:04 +0100 | |
| commit | efb3fae035c7773a233d2bb3ecc455a956c80eff (patch) | |
| tree | 3f13a35c721f652ebdf8b8e4d5d7aaabf3a9add9 /src/hooks | |
| parent | 9cc204b0613a677bb3fec0b7bd357eb2968144ae (diff) | |
| download | client-efb3fae035c7773a233d2bb3ecc455a956c80eff.tar.gz client-efb3fae035c7773a233d2bb3ecc455a956c80eff.tar.bz2 client-efb3fae035c7773a233d2bb3ecc455a956c80eff.zip | |
Updated uiv1.2.2
Diffstat (limited to 'src/hooks')
| -rw-r--r-- | src/hooks/useRequests.tsx | 10 |
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 @@ | |||
| 1 | import {useCallback, useEffect, useMemo, useState} from "react"; | 1 | import {useCallback, useEffect, useMemo, useState} from "react"; |
| 2 | import {getHost} from "../utils"; | 2 | import {getHost} from "../utils"; |
| 3 | 3 | ||
| 4 | type Dict = { | 4 | export type Headers = [string, string][] |
| 5 | [key: string]: string | ||
| 6 | } | ||
| 7 | 5 | ||
| 8 | export interface RequestPayload { | 6 | export 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 | ||
