Skip to main content

Class: AbstractJinFrame

Hierarchy

Constructors

constructor

new AbstractJinFrame(args)

Parameters

NameType
argsObject
args.contentType?string
args.customBody?Object
args.host?string
args.methodMethod
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

NameType
bodiesRecord<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

NameTypeDescription
option?IJinFrameRequestConfig & IJinFrameCreateConfigsame 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

NameTypeDescription
option?Partial<Except<IBodyFieldOption, "type">>body parameter option

Returns

fn

▸ (target): void

Parameters
NameType
targetFunction
Returns

void

▸ (target, propertyKey): void

Parameters
NameType
targetObject
propertyKeystring | symbol
Returns

void

Defined in

jin-frame/src/frames/AbstractJinFrame.ts:60


Static header(option?): (target: Function) => void(target: Object, propertyKey: string | symbol) => void

decorator to set class variable to HTTP API header parameter

Parameters

NameTypeDescription
option?Partial<Except<IHeaderFieldOption, "type">>header parameter option

Returns

fn

▸ (target): void

Parameters
NameType
targetFunction
Returns

void

▸ (target, propertyKey): void

Parameters
NameType
targetObject
propertyKeystring | 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

NameTypeDescription
option?Partial<Except<IObjectBodyFieldOption, "type">>body parameter option

Returns

fn

▸ (target): void

Parameters
NameType
targetFunction
Returns

void

▸ (target, propertyKey): void

Parameters
NameType
targetObject
propertyKeystring | 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

NameTypeDescription
option?Partial<Omit<IParamFieldOption, "type">>path parameter option

Returns

fn

▸ (target): void

Parameters
NameType
targetFunction
Returns

void

▸ (target, propertyKey): void

Parameters
NameType
targetObject
propertyKeystring | 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

NameTypeDescription
option?Partial<Omit<IQueryFieldOption, "type">>query parameter option

Returns

fn

▸ (target): void

Parameters
NameType
targetFunction
Returns

void

▸ (target, propertyKey): void

Parameters
NameType
targetObject
propertyKeystring | symbol
Returns

void

Defined in

jin-frame/src/frames/AbstractJinFrame.ts:53