Preparing search index...
The search index is not available
KoAJAX
KoAJAX
HTTPClient
Class HTTPClient<T>
Type Parameters
T
extends
Context
Hierarchy (
View Summary
)
Stack
<
T
>
HTTPClient
Index
Constructors
constructor
Properties
base
Request
baseURI
default
Ware
length
options
Methods
delete
download
execute
get
head
mount
patch
post
put
request
use
Constructors
constructor
new
HTTPClient
<
T
extends
Context
>
(
__namedParameters
?:
ClientOptions
,
)
:
HTTPClient
<
T
>
Type Parameters
T
extends
Context
Parameters
__namedParameters
:
ClientOptions
= {}
Returns
HTTPClient
<
T
>
Properties
base
Request
baseRequest
:
<
B
>
(
__namedParameters
:
Request
<
any
>
)
=>
RequestResult
<
B
>
baseURI
baseURI
:
string
default
Ware
defaultWare
:
Middleware
<
T
>
= ...
length
length
:
number
= 0
options
options
:
RequestOptions
Methods
delete
delete
<
B
>
(
path
:
string
|
URL
,
body
?:
any
,
headers
?:
HeadersInit
,
options
?:
MethodOptions
,
)
:
Promise
<
Response
<
B
>
>
Type Parameters
B
Parameters
path
:
string
|
URL
Optional
body
:
any
Optional
headers
:
HeadersInit
Optional
options
:
MethodOptions
Returns
Promise
<
Response
<
B
>
>
download
download
(
path
:
string
|
URL
,
__namedParameters
?:
DownloadOptions
,
)
:
AsyncGenerator
<
TransferProgress
,
any
,
any
>
Parameters
path
:
string
|
URL
__namedParameters
:
DownloadOptions
= {}
Returns
AsyncGenerator
<
TransferProgress
,
any
,
any
>
execute
execute
(
context
?:
T
,
depth
?:
number
)
:
any
Parameters
Optional
context
:
T
depth
:
number
= 0
Returns
any
get
get
<
B
>
(
path
:
string
|
URL
,
headers
?:
HeadersInit
,
options
?:
MethodOptions
,
)
:
Promise
<
Response
<
B
>
>
Type Parameters
B
Parameters
path
:
string
|
URL
Optional
headers
:
HeadersInit
Optional
options
:
MethodOptions
Returns
Promise
<
Response
<
B
>
>
head
head
(
path
:
string
|
URL
,
headers
?:
HeadersInit
,
options
?:
MethodOptions
,
)
:
Promise
<
Record
<
string
,
string
|
object
>
>
Parameters
path
:
string
|
URL
Optional
headers
:
HeadersInit
Optional
options
:
MethodOptions
Returns
Promise
<
Record
<
string
,
string
|
object
>
>
mount
mount
(
condition
:
(
context
:
T
)
=>
boolean
,
stack
:
Stack
<
T
>
)
:
HTTPClient
<
T
>
Parameters
condition
:
(
context
:
T
)
=>
boolean
stack
:
Stack
<
T
>
Returns
HTTPClient
<
T
>
patch
patch
<
B
>
(
path
:
string
|
URL
,
body
?:
any
,
headers
?:
HeadersInit
,
options
?:
MethodOptions
,
)
:
Promise
<
Response
<
B
>
>
Type Parameters
B
Parameters
path
:
string
|
URL
Optional
body
:
any
Optional
headers
:
HeadersInit
Optional
options
:
MethodOptions
Returns
Promise
<
Response
<
B
>
>
post
post
<
B
>
(
path
:
string
|
URL
,
body
?:
any
,
headers
?:
HeadersInit
,
options
?:
MethodOptions
,
)
:
Promise
<
Response
<
B
>
>
Type Parameters
B
Parameters
path
:
string
|
URL
Optional
body
:
any
Optional
headers
:
HeadersInit
Optional
options
:
MethodOptions
Returns
Promise
<
Response
<
B
>
>
put
put
<
B
>
(
path
:
string
|
URL
,
body
?:
any
,
headers
?:
HeadersInit
,
options
?:
MethodOptions
,
)
:
Promise
<
Response
<
B
>
>
Type Parameters
B
Parameters
path
:
string
|
URL
Optional
body
:
any
Optional
headers
:
HeadersInit
Optional
options
:
MethodOptions
Returns
Promise
<
Response
<
B
>
>
request
request
<
B
>
(
data
:
T
[
"request"
]
)
:
Promise
<
Response
<
B
>
>
Type Parameters
B
Parameters
data
:
T
[
"request"
]
Returns
Promise
<
Response
<
B
>
>
use
use
(
...
middlewares
:
Middleware
<
T
>
[]
)
:
HTTPClient
<
T
>
Parameters
...
middlewares
:
Middleware
<
T
>
[]
Returns
HTTPClient
<
T
>
Settings
Member Visibility
Protected
Inherited
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
base
Request
baseURI
default
Ware
length
options
Methods
delete
download
execute
get
head
mount
patch
post
put
request
use
KoAJAX
BodyRequestMethods
FileMethod
HTTPClient
HTTPError
Stack
ClientOptions
Context
DownloadOptions
Request
RequestOptions
RequestResult
Response
TransferProgress
LinkHeader
MethodOptions
Middleware
ProgressData
ProgressEventTarget
headerParser
emitStreamProgress
encodeBase64
makeFormData
parseBody
parseDocument
parseFetchBody
parseHeaders
parseResponse
readAs
request
requestFetch
requestXHR
serialize
serializeNode
streamFromProgress
M
M
N
E
P
V
F
C
I
C
P
M
F
P
C
P
T
T
A
A
A
T
R