package com.xm.test.myfilemaster.util

import com.google.gson.Gson
import com.xm.test.myfilemaster.model.AdConfigData
import okhttp3.OkHttpClient
import okhttp3.Request

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()
    }
}