Appearance
@ryanuo/utils / network / fetchWithTimeout
function fetchWithTimeout( url, options, timeout): Promise<Response>;
带超时的 fetch 请求
string
请求地址
RequestInit = {}
RequestInit
{}
请求配置
number = 5000
number
5000
超时时间(默认 5s)
Promise<Response>
Promise
Response