package com.rc.httpcore.config

import com.rc.httpcore.HttpConfig

object ConfigCore {

    fun initConfig(config: ConfigParam?, baseUrlSp: String?, fileBrowserBaseUrlSp: String?) {
        if (null != config) {
            HttpConfig.API_BASE_URL = if (baseUrlSp.isNullOrEmpty()) config.baseUrl else baseUrlSp
            HttpConfig.FILE_BROWSER_BASE_URL =
                if (fileBrowserBaseUrlSp.isNullOrEmpty()) config.fileBrowserBaseUrl else fileBrowserBaseUrlSp
            HttpConfig.HTTP_STRATEGY = config.httpStrategy
        }
    }

}