All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.authing.sdk.java.client.BaseClient Maven / Gradle / Ivy

There is a newer version: 3.1.10
Show newest version
package cn.authing.sdk.java.client;

import cn.authing.sdk.java.model.AuthingClientOptions;
import cn.authing.sdk.java.model.AuthingRequestConfig;
import cn.authing.sdk.java.util.JsonUtils;

/**
 * @author luojielin
 */
public class BaseClient {
    
    protected AuthingClientOptions options;
    
    public BaseClient(AuthingClientOptions options) {
        this.options = options;
    }
    
    public static  T deserialize(String content, Class valueType) {
         return JsonUtils.deserialize(content, valueType);
    }
    
    public static String serialize(Object value) {
        return JsonUtils.serialize(value);
    }
    
    public String request(AuthingRequestConfig config) {
        return options.doRequest(config.getUrl(), config.getMethod(), config.getHeaders(), config.getBody());
    }
    
    
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy