Skip to content

jin-frame / interfaces/options/IFrameOption / IFrameOption

Interface: IFrameOption

Defined in: src/interfaces/options/IFrameOption.ts:5

Properties

authoriztion?

optional authoriztion: string | AxiosBasicCredentials

Defined in: src/interfaces/options/IFrameOption.ts:47

set authorizaiton header eg. Bearer i-am-authorization-key


contentType

contentType: string

Defined in: src/interfaces/options/IFrameOption.ts:23

content-type of API Request endpoint


customBody?

optional customBody: unknown

Defined in: src/interfaces/options/IFrameOption.ts:29

custom object of POST Request body data


host?

optional host: string

Defined in: src/interfaces/options/IFrameOption.ts:14

host and path of API Request endpoint

원한다면 protocol://host/path 전체를 host에 전달해도 정상 동작한다. 그럼에도 불구하고 굳이 host와 path를 분리한 이유는 Parent Class에 host를 설정하고 그것을 계속 상속을 받아서 사용하는 방식으로 확장하는 경우, Child Class에서는 path만 설정할 수 있어야 하기 때문에 둘을 분리해서 처리할 수도 있어야 한다.


method

method: TMethod

Defined in: src/interfaces/options/IFrameOption.ts:20

method of API Request endpoint


path?

optional path: string

Defined in: src/interfaces/options/IFrameOption.ts:17

path of API Request endpoint


retry?

optional retry: IFrameRetry

Defined in: src/interfaces/options/IFrameOption.ts:35

retry configuration


timeout?

optional timeout: number

Defined in: src/interfaces/options/IFrameOption.ts:41

timeout of the request


transformRequest?

optional transformRequest: AxiosRequestTransformer | AxiosRequestTransformer[]

Defined in: src/interfaces/options/IFrameOption.ts:32

transformRequest function of POST Request


useInstance

useInstance: boolean

Defined in: src/interfaces/options/IFrameOption.ts:38

if set true the field, create axios instance


userAgent?

optional userAgent: string

Defined in: src/interfaces/options/IFrameOption.ts:26

user agent of API Request endpoint