일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 용산 호반써밋 에이디션
- ios
- 3rd framework
- audio record
- Andorid
- 사전청약
- 새마을금고
- MG더뱅킹정기예금
- Swift
- 청약
- Data Binding
- RETROFIT
- Android
- Android Studio
- 고금리
- ChatGPT
- 달러예금
- EditText
- CHAT GPT
- java
- Mac
- kotlin
- gradle
- ndk r24
- ndkVersion
- JetPack
- BindingAdapter
- KB
- 예금
- arm-linux-androideabi
- Today
- Total
목록RETROFIT (4)
pear
Okhttp HTTP 통신을 간편하게 구현할 수 있도록 다양한 기능을 제공해주는 라이브러리 입니다. Retrofit Okhttp를 사용하여 rest server와 통신을 간편하게 구현할 수 있도록 다양한 기능을 제공해주는 라이브러리 입니다. Type-Safe Response에 대한 Type을 정의 할수 있음 async-thread-safe network 동작에 대한 편리한 interface 제공 HTTP Method interface Builder interface DTO(Data Transfer Object) - 이름과 같이 계층 간 데이터 교환을 위해 사용하는 객체다. *여기서 말하는 계층이란, View - Controller - Service - DAO와 같은 각 계층을 말한다. - VO와 혼용되어..
Request Body import com.google.gson.annotations.SerializedName; public class GptCall { @SerializedName("model") public String model; @SerializedName("messages") public messages messages; @SerializedName("max_tokens") public String max_tokens; public class messages { public String role; public String content; } } Request Body Json String Example //String json = "{\"model\": \"gpt-3.5-turbo\", \"m..
OKHttpclient import java.io.IOException; import java.util.concurrent.TimeUnit; import okhttp3.Interceptor; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; import okhttp3.logging.HttpLoggingInterceptor; import retrofit2.Retrofit; import retrofit2.converter.gson.GsonConverterFactory; import retrofit2.converter.scalars.ScalarsConverterFactory; public class RetrofitGPT ..
Call Retrofit API GPTRetrofitInterface mRetrofitInterface = RetrofitGPT .getClient(domain).create(GPTRetrofitInterface.class); try { gptBody body = new gptBody(); body.model = "gpt-3.5-turbo"; body.messages[0].role = "user"; body.messages[0].content = "contents"; Gson gson = new Gson(); String json = gson.toJson(body); JsonObject jsonObject = JsonParser.parseString(json).getAsJsonObject(); Call ..