package com.test.mydemo3.util

import com.google.gson.Gson
import com.test.mydemo3.model.AdConfigData
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response

object HttpRequest {

    fun getMaxAdConfig(){
        Thread(Runnable {
            val okHttpClient = OkHttpClient()
            val request = Request.Builder()
                .url(UrlManager.URL_)
                .build()

            val response = okHttpClient.newCall(request).execute()
            if (response.isSuccessful){
                Gson().fromJson(response.body().toString(), AdConfigData::class.java)
            }


        }).start()
    }
}