API 옵션

interface ApiOptions {
    auth?: AxiosBasicCredentials;
    baseURL?: string;
    beforeRedirect?: ((options, responseDetails) => void);
    data?: any;
    decompress?: boolean;
    disableCheckErrorWhenAuthInactivated?: boolean;
    encodeURIParams?: boolean;
    env?: {
        FormData?: (new (...args) => object);
    };
    excludeAuthValidation?: boolean;
    excludeAuthValidationOnServer?: boolean;
    family?: AddressFamily;
    formSerializer?: FormSerializerOptions;
    headers?: AxiosHeaders | Partial<RawAxiosHeaders & {
        Accept: AxiosHeaderValue;
        Authorization: AxiosHeaderValue;
        Content-Encoding: AxiosHeaderValue;
        Content-Length: AxiosHeaderValue;
        User-Agent: AxiosHeaderValue;
    } & {
        Content-Type: ContentType;
    }> & Partial<{
        delete: AxiosHeaders;
        get: AxiosHeaders;
        head: AxiosHeaders;
        link: AxiosHeaders;
        options: AxiosHeaders;
        patch: AxiosHeaders;
        post: AxiosHeaders;
        purge: AxiosHeaders;
        put: AxiosHeaders;
        unlink: AxiosHeaders;
    } & {
        common: AxiosHeaders;
    }>;
    ignoreErrorUrlPatterns?: string[];
    insecureHTTPParser?: boolean;
    lookup?: ((hostname, options, cb) => void) | ((hostname, options) => Promise<LookupAddress | [address: LookupAddressEntry | LookupAddressEntry[], family?: AddressFamily]>);
    maxBodyLength?: number;
    maxContentLength?: number;
    maxRate?: number | [number, number];
    maxRedirects?: number;
    maximumConcurrentNumber?: number;
    method?: string;
    occurErrorwhenReceivedApiErrCode?: boolean;
    onRetry?: ((retryCount, error, requestConfig) => void);
    params?: any;
    passOnResponseCode?: string[];
    passOnResponseError?: boolean;
    proxy?: false | AxiosProxyConfig;
    responseEncoding?: string;
    responseType?: ResponseType;
    retries?: number;
    retryCondition?: ((error) => boolean | Promise<boolean>);
    retryDelay?: ((retryCount, error) => number);
    secured?: boolean;
    shouldResetTimeout?: boolean;
    showLoadingBar?: boolean;
    socketPath?: string;
    taskDelay?: number;
    timeout?: number;
    timeoutErrorMessage?: string;
    tranId?: string;
    tranTypeId?: string;
    transitional?: TransitionalOptions;
    transport?: any;
    url?: string;
    withCredentials?: boolean;
    withXSRFToken?: boolean | ((config) => boolean);
    xsrfCookieName?: string;
    xsrfHeaderName?: string;
}

Hierarchy

  • Partial<Omit<ApiOriginOptions, "transformRequest" | "transformResponse" | "paramsSerializer" | "adapter" | "onUploadProgress" | "onDownloadProgress" | "validateStatus" | "cancelToken" | "axiosInstance" | "httpAgent" | "httpsAgent" | "jsonp" | "axios-retry" | "cancelToken" | "signal">>
  • Partial<TaskQueueOptions>
    • ApiOptions

Properties

auth?: AxiosBasicCredentials
baseURL?: string
beforeRedirect?: ((options, responseDetails) => void)

Type declaration

    • (options, responseDetails): void
    • Parameters

      • options: Record<string, any>
      • responseDetails: {
            headers: Record<string, string>;
            statusCode: HttpStatusCode;
        }
        • headers: Record<string, string>
        • statusCode: HttpStatusCode

      Returns void

data?: any
decompress?: boolean
disableCheckErrorWhenAuthInactivated?: boolean

인증이 만료되었을 경우, API의 오류를 체크 비활성화 여부

Default

true
encodeURIParams?: boolean

params 데이터 URL 인코딩 수행 여부

Default

false

Since

3.0.2-stable

env?: {
    FormData?: (new (...args) => object);
}

Type declaration

  • Optional FormData?: (new (...args) => object)
      • new (...args): object
      • Parameters

        • Rest ...args: any[]

        Returns object

excludeAuthValidation?: boolean

인증 검증 제외 여부

Default

false
excludeAuthValidationOnServer?: boolean

excludeAuthValidation 속성이 설정되지 않았을 경우, 서버 상에서 excludeAuthValidation 값을 true로 설정한다.

Default

true
family?: AddressFamily
formSerializer?: FormSerializerOptions
headers?: AxiosHeaders | Partial<RawAxiosHeaders & {
    Accept: AxiosHeaderValue;
    Authorization: AxiosHeaderValue;
    Content-Encoding: AxiosHeaderValue;
    Content-Length: AxiosHeaderValue;
    User-Agent: AxiosHeaderValue;
} & {
    Content-Type: ContentType;
}> & Partial<{
    delete: AxiosHeaders;
    get: AxiosHeaders;
    head: AxiosHeaders;
    link: AxiosHeaders;
    options: AxiosHeaders;
    patch: AxiosHeaders;
    post: AxiosHeaders;
    purge: AxiosHeaders;
    put: AxiosHeaders;
    unlink: AxiosHeaders;
} & {
    common: AxiosHeaders;
}>
ignoreErrorUrlPatterns?: string[]

오류 응답 수신 무신 처리 URL 패턴

insecureHTTPParser?: boolean
lookup?: ((hostname, options, cb) => void) | ((hostname, options) => Promise<LookupAddress | [address: LookupAddressEntry | LookupAddressEntry[], family?: AddressFamily]>)

Type declaration

    • (hostname, options, cb): void
    • Parameters

      • hostname: string
      • options: object
      • cb: ((err, address, family?) => void)
          • (err, address, family?): void
          • Parameters

            • err: Error
            • address: LookupAddress | LookupAddress[]
            • Optional family: AddressFamily

            Returns void

      Returns void

Type declaration

    • (hostname, options): Promise<LookupAddress | [address: LookupAddressEntry | LookupAddressEntry[], family?: AddressFamily]>
    • Parameters

      • hostname: string
      • options: object

      Returns Promise<LookupAddress | [address: LookupAddressEntry | LookupAddressEntry[], family?: AddressFamily]>

maxBodyLength?: number
maxContentLength?: number
maxRate?: number | [number, number]
maxRedirects?: number
maximumConcurrentNumber?: number

동시 호출 가능한 호출 수 설정 (0이하일 경우, 무제한)

Default

3
method?: string
occurErrorwhenReceivedApiErrCode?: boolean

API로부터 오류 응답 수신 시 에러 발생 여부

Default

true
onRetry?: ((retryCount, error, requestConfig) => void)

A callback to get notified when a retry occurs, the number of times it has occurre, and the error

Type declaration

    • (retryCount, error, requestConfig): void
    • A callback to get notified when a retry occurs, the number of times it has occurre, and the error

      Parameters

      • retryCount: number
      • error: AxiosError<unknown, any>
      • requestConfig: AxiosRequestConfig<any>

      Returns void

params?: any
passOnResponseCode?: string[]

특정 응답 코드일 경우, 오류 처리하지 않음.

Default

['0000']
passOnResponseError?: boolean

API 응답 코드 오류 시 PASS 여부

proxy?: false | AxiosProxyConfig
responseEncoding?: string
responseType?: ResponseType
retries?: number

The number of times to retry before failing default: 3

retryCondition?: ((error) => boolean | Promise<boolean>)

A callback to further control if a request should be retried. default: it retries if it is a network error or a 5xx error on an idempotent request (GET, HEAD, OPTIONS, PUT or DELETE).

Type declaration

    • (error): boolean | Promise<boolean>
    • A callback to further control if a request should be retried. default: it retries if it is a network error or a 5xx error on an idempotent request (GET, HEAD, OPTIONS, PUT or DELETE).

      Parameters

      • error: AxiosError<unknown, any>

      Returns boolean | Promise<boolean>

retryDelay?: ((retryCount, error) => number)

A callback to further control the delay between retry requests. By default there is no delay.

Type declaration

    • (retryCount, error): number
    • A callback to further control the delay between retry requests. By default there is no delay.

      Parameters

      • retryCount: number
      • error: AxiosError<unknown, any>

      Returns number

secured?: boolean

보안 암호화 통신 여부

Default

false
shouldResetTimeout?: boolean

Defines if the timeout should be reset between retries default: false

showLoadingBar?: boolean

로딩 바 display 여부

Default

true
socketPath?: string
taskDelay?: number

task delay

Default

10
timeout?: number
timeoutErrorMessage?: string
tranId?: string

거래아이디(undefined일 경우 신규 생성)

tranTypeId?: string

거래 유형 아이디 (고유 아이디를 사용하여 일괄 취소를 처리할 수 있다.)

Since

3.0.0-rc.5

transitional?: TransitionalOptions
transport?: any
url?: string
withCredentials?: boolean
withXSRFToken?: boolean | ((config) => boolean)

Type declaration

    • (config): boolean
    • Parameters

      • config: InternalAxiosRequestConfig<any>

      Returns boolean

xsrfCookieName?: string
xsrfHeaderName?: string

Generated using TypeDoc