강의

멘토링

로드맵

Inflearn Community Q&A

aksqhqkqh37186's profile image
aksqhqkqh37186

asked

[Beginner-Intermediate] Creating an Android Dating App (Android Kotlin)

Using Retrofit

Retrofit 사용해보기 강의 2:20 쯤에 작성된 복사된 코드는 어디서 받나요?

Written on

·

227

0

Retrofit 사용해보기 강의 2:20 쯤에 작성된 복사된 코드는 어디서 받나요?

androidkotlinfirebase

Answer 2

0

aksqhqkqh37186님의 프로필 이미지
aksqhqkqh37186
Questioner

감사합니다.

0

bokchi님의 프로필 이미지
bokchi
Instructor

안녕하세요

섹션0 강의소개에
전체소스코드에서 다운받아서 사용하시면 됩니다 아래 코드입니다.

 

import com.bokchi.sogating_final.message.fcm.Repo.Companion.CONTENT_TYPE
import com.bokchi.sogating_final.message.fcm.Repo.Companion.SERVER_KEY
import okhttp3.ResponseBody
import retrofit2.Response
import retrofit2.http.Body
import retrofit2.http.Headers
import retrofit2.http.POST

interface NotiAPI {

@Headers("Authorization: key=$SERVER_KEY", "Content-Type:$CONTENT_TYPE")
@POST("fcm/send")
suspend fun postNotification(@Body notification: PushNotification): Response<ResponseBody>

}

aksqhqkqh37186's profile image
aksqhqkqh37186

asked

Ask a question