본문 바로가기

나만 보는 일기장

검색하기
나만 보는 일기장
프로필사진 Patrick0422

  • 분류 전체보기 (48)
    • 개발 (46)
      • Android (39)
      • Electron (2)
      • 기타 (4)
    • 그냥 (2)
Guestbook
Notice
Recent Posts
Recent Comments
Link
  • 깃허브
«   2025/09   »
일 월 화 수 목 금 토
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
Tags
  • Gradle
  • Navigation Component
  • 면접
  • 주석
  • Binding Adapter
  • electron
  • BottomNavigationView
  • hilt
  • kotlin
  • asLiveData()
  • themes.xml
  • 스플래시
  • 일렉트론
  • 취업
  • fragment
  • Safe Args
  • imageview
  • android studio
  • nav_graph
  • 개발자
  • 안드로이드
  • Android
  • Jetpack Compose
  • 테마
  • Livedata
  • ViewModel
  • recyclerview
  • Datastore
  • TypeConverter
  • room
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록API Key (1)

나만 보는 일기장

[Retrofit] Header Interceptor 추가

@Singleton @Provides fun provideHeaderInterceptor(): Interceptor = Interceptor { chain -> chain.run { proceed( request() .newBuilder() .addHeader("x-rapidapi-host", API_HOST) .addHeader("x-rapidapi-key", API_KEY) .build() ) } } 를 통해 모든 요청에 특정한 헤더 등을 추가할 수 있습니다.

개발/Android 2022. 3. 2. 16:19
Prev 1 Next

Blog is powered by kakao / Designed by Tistory

티스토리툴바