Class: AbstractJinFrame
Hierarchy
AbstractJinFrame
↳
JinFrame
Constructors
constructor
• new AbstractJinFrame(args
)
Parameters
Name | Type |
---|---|
args | Object |
args.contentType? | string |
args.customBody? | Object |
args.host? | string |
args.method | Method |
args.path? | string |
args.transformRequest? | AxiosRequestTransformer | AxiosRequestTransformer [] |
Defined in
jin-frame/src/frames/AbstractJinFrame.ts:104
Properties
contentType
• Readonly
contentType: string
content-type of API Request endpoint
Defined in
jin-frame/src/frames/AbstractJinFrame.ts:87
customBody
• Optional
Readonly
customBody: Object
custom object of POST Request body data
Index signature
▪ [key: string
]: any
Defined in
jin-frame/src/frames/AbstractJinFrame.ts:90
host
• Optional
Readonly
host: string
host of API Request endpoint
Defined in
jin-frame/src/frames/AbstractJinFrame.ts:78
method
• Readonly
method: Method
method of API Request endpoint
Defined in
jin-frame/src/frames/AbstractJinFrame.ts:84
path
• Optional
Readonly
path: string
pathname of API Request endpoint
Defined in
jin-frame/src/frames/AbstractJinFrame.ts:81
startAt
• Protected
startAt: Date
Defined in
jin-frame/src/frames/AbstractJinFrame.ts:95
transformRequest
• Optional
Readonly
transformRequest: AxiosRequestTransformer
| AxiosRequestTransformer
[]
transformRequest function of POST Request
Defined in
jin-frame/src/frames/AbstractJinFrame.ts:93
BodySymbolBox
▪ Static
BodySymbolBox: symbol
Defined in
jin-frame/src/frames/AbstractJinFrame.ts:36
HeaderSymbolBox
▪ Static
HeaderSymbolBox: symbol
Defined in
jin-frame/src/frames/AbstractJinFrame.ts:40
ObjectBodySymbolBox
▪ Static
ObjectBodySymbolBox: symbol
Defined in
jin-frame/src/frames/AbstractJinFrame.ts:38
ParamSymbolBox
▪ Static
ParamSymbolBox: symbol
Defined in
jin-frame/src/frames/AbstractJinFrame.ts:32
QuerySymbolBox
▪ Static
QuerySymbolBox: symbol
Defined in
jin-frame/src/frames/AbstractJinFrame.ts:34
Methods
getFormData
▸ getFormData(bodies
): Record
<string
, any
> | FormData
Parameters
Name | Type |
---|---|
bodies | Record <string , any > |
Returns
Record
<string
, any
> | FormData
Defined in
jin-frame/src/frames/AbstractJinFrame.ts:143
getTransformRequest
▸ getTransformRequest(): undefined
| AxiosRequestTransformer
| AxiosRequestTransformer
[]
Returns
undefined
| AxiosRequestTransformer
| AxiosRequestTransformer
[]
Defined in
jin-frame/src/frames/AbstractJinFrame.ts:125
request
▸ request(option?
): AxiosRequestConfig
<any
>
AxiosRequestConfig create using by class member variable.
Parameters
Name | Type | Description |
---|---|---|
option? | IJinFrameRequestConfig & IJinFrameCreateConfig | same with AxiosRequestConfig, bug exclude some filed ignored |
Returns
AxiosRequestConfig
<any
>
created AxiosRequestConfig
Defined in
jin-frame/src/frames/AbstractJinFrame.ts:186
body
▸ Static
body(option?
): (target
: Function
) => void
(target
: Object
, propertyKey
: string
| symbol
) => void
decorator to set class variable to HTTP API body parameter
Parameters
Name | Type | Description |
---|---|---|
option? | Partial <Except <IBodyFieldOption , "type" >> | body parameter option |
Returns
fn
▸ (target
): void
Parameters
Name | Type |
---|---|
target | Function |
Returns
void
▸ (target
, propertyKey
): void
Parameters
Name | Type |
---|---|
target | Object |
propertyKey | string | symbol |
Returns
void
Defined in
jin-frame/src/frames/AbstractJinFrame.ts:60
header
▸ Static
header(option?
): (target
: Function
) => void
(target
: Object
, propertyKey
: string
| symbol
) => void
decorator to set class variable to HTTP API header parameter
Parameters
Name | Type | Description |
---|---|---|
option? | Partial <Except <IHeaderFieldOption , "type" >> | header parameter option |
Returns
fn
▸ (target
): void
Parameters
Name | Type |
---|---|
target | Function |
Returns
void
▸ (target
, propertyKey
): void
Parameters
Name | Type |
---|---|
target | Object |
propertyKey | string | symbol |
Returns
void
Defined in
jin-frame/src/frames/AbstractJinFrame.ts:74
objectBody
▸ Static
objectBody(option?
): (target
: Function
) => void
(target
: Object
, propertyKey
: string
| symbol
) => void
decorator to set class variable to HTTP API body parameter
Parameters
Name | Type | Description |
---|---|---|
option? | Partial <Except <IObjectBodyFieldOption , "type" >> | body parameter option |
Returns
fn
▸ (target
): void
Parameters
Name | Type |
---|---|
target | Function |
Returns
void
▸ (target
, propertyKey
): void
Parameters
Name | Type |
---|---|
target | Object |
propertyKey | string | symbol |
Returns
void
Defined in
jin-frame/src/frames/AbstractJinFrame.ts:67
param
▸ Static
param(option?
): (target
: Function
) => void
(target
: Object
, propertyKey
: string
| symbol
) => void
decorator to set class variable to HTTP API path parameter
Parameters
Name | Type | Description |
---|---|---|
option? | Partial <Omit <IParamFieldOption , "type" >> | path parameter option |
Returns
fn
▸ (target
): void
Parameters
Name | Type |
---|---|
target | Function |
Returns
void
▸ (target
, propertyKey
): void
Parameters
Name | Type |
---|---|
target | Object |
propertyKey | string | symbol |
Returns
void
Defined in
jin-frame/src/frames/AbstractJinFrame.ts:46
query
▸ Static
query(option?
): (target
: Function
) => void
(target
: Object
, propertyKey
: string
| symbol
) => void
decorator to set class variable to HTTP API query parameter
Parameters
Name | Type | Description |
---|---|---|
option? | Partial <Omit <IQueryFieldOption , "type" >> | query parameter option |
Returns
fn
▸ (target
): void
Parameters
Name | Type |
---|---|
target | Function |
Returns
void
▸ (target
, propertyKey
): void
Parameters
Name | Type |
---|---|
target | Object |
propertyKey | string | symbol |
Returns
void