Skip to content

[#13] 기본 인터셉터와 인터셉터 체인을 구현한다#22

Merged
opficdev merged 7 commits into
developfrom
feat/#13-interceptors
Apr 13, 2026
Merged

[#13] 기본 인터셉터와 인터셉터 체인을 구현한다#22
opficdev merged 7 commits into
developfrom
feat/#13-interceptors

Conversation

@opficdev
Copy link
Copy Markdown
Owner

🔗 연관된 이슈

📝 작업 내용

📌 요약

  • 인터셉터 기반 타입과 기본 인터셉터 구현
  • 요청 실행 API를 인터셉터 체인 연결
  • 인터셉터 런타임 테스트 추가

🔍 상세

  • NXLogger, NXLogEvent, NXRequestExecutionContext, NXHTTPInterceptor 추가
  • NXClientConfiguration에 logger, 전역 interceptors 설정 추가
  • RequestSpec에 요청 단위 interceptors 저장 추가
  • NXInterceptorChain 추가
  • NXRetryInterceptor 추가
  • NXAuthInterceptor 추가
  • NXLoggerInterceptor 추가
  • NXRequestExecutor 추가
  • NXRequestBuilderretry, validate, intercept, 실제 raw/send/sendVoid 실행 연결 추가
  • NXAPIClient.send(_ endpoint:) 추가
  • auth, retry, 전역/요청 인터셉터 적용, logger redaction, endpoint send 동작 테스트 추가
  • 기존 실행 API placeholder 테스트를 transport 기반 실행 테스트로 변경

테스트

  • swift test 통과

📸 영상 / 이미지 (Optional)

image

@opficdev opficdev self-assigned this Apr 13, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

이번 pull request는 Nexa 라이브러리에 인터셉터 기반의 요청 실행 파이프라인을 구축하고 로깅, 재시도, 인증 토큰 갱신 기능을 추가합니다. NXRequestBuilder에 send, raw 등의 실행 메서드를 구현하고 NXInterceptorChain을 통해 요청 처리 과정을 모듈화했습니다. 피드백으로는 재시도 인터셉터의 불필요한 코드 제거와 인증 인터셉터 내 토큰 갱신 로직의 효율성 개선을 제안했습니다.

Comment thread Nexa/Sources/Nexa/Runtime/NXRetryInterceptor.swift Outdated
Comment thread Nexa/Sources/Nexa/Runtime/NXAuthInterceptor.swift Outdated
@opficdev opficdev merged commit 217c53c into develop Apr 13, 2026
4 checks passed
@opficdev opficdev deleted the feat/#13-interceptors branch April 13, 2026 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

기본 인터셉터와 인터셉터 체인을 구현한다

1 participant