Options
All
  • Public
  • Public/Protected
  • All
Menu
export

Hierarchy

  • ApiPlugin

Index

Constructors

constructor

Properties

Private $ustra

$ustra: UstraPlugin = null

Private completedCheckTimer

completedCheckTimer: any = null

Private createdInstance

createdInstance: boolean = false

Methods

addInterceptor

  • addInterceptor(): void

addRequestCompletedCallback

  • addRequestCompletedCallback(callback: Function): void

addRequestInterceptor

  • addRequestInterceptor(interceptor: AxiosRequestInterceptorArgs): void

addResponseInterceptor

  • addResponseInterceptor(interceptor: AxiosResponseInterceptorArgs): void

Private applyGlobalRequestInterceptor

  • applyGlobalRequestInterceptor(): void

Private applyResCodeCheckingInterceptor

call

Private createAxiosInstance

  • createAxiosInstance(): AxiosInstance

createCancelToken

  • createCancelToken(): CancelTokenSource

createUrlEncodedParameter

  • createUrlEncodedParameter(params: object, encodeBase64?: boolean): string

downloadFile

  • downloadFile(option: { data?: any; fileName: string; method?: HttpMethod; params?: Record<string, any>; showLoading?: boolean; url: string }): Promise<void>
  • 파일을 다운로드 한다.

    Parameters

    • option: { data?: any; fileName: string; method?: HttpMethod; params?: Record<string, any>; showLoading?: boolean; url: string }

      옵션

      • url : 호출 URL
      • fileName : 다운로드 파일 명
      • method : 호출 HTTP 메소드
      • showLoading : 로딩 바 호출 여부
      • data : 호출 데이터
      • params : 파라메터
      • Optional data?: any
      • fileName: string
      • Optional method?: HttpMethod
      • Optional params?: Record<string, any>
      • Optional showLoading?: boolean
      • url: string

    Returns Promise<void>

Private getApiRequestOption

Private getAxios

  • getAxios(): AxiosInstance

isCancel

  • isCancel(err: Error): boolean

Private normalizeCallOption

  • normalizeCallOption(option: ApiCallOption): ExtendAxiosRequestConfig & { excludeAuthValidation: boolean; passOnResponseCode: string[]; passOnResponseError: boolean; showLoading: boolean }

sse

  • sse(option: SseEmitterOption): EventSource

urlBuilder

  • urlBuilder(baseUrl: string): UrlBuilder