mac
2024-04-29 e5de2673f1346f06e03a196322d33df056f80a22
app/src/main/java/com/hdl/photovoltaic/internet/HttpClient.java
@@ -47,7 +47,7 @@
    private static volatile HttpClient sHttpClient;
    private static final boolean isAddToMemory=false;
    private static final boolean isAddToMemory = false;
    public static synchronized HttpClient getInstance() {
        if (sHttpClient == null) {
@@ -73,6 +73,7 @@
    private Disposable requestPost(String api, String body, CloudCallBeak<String> callBack) {
        String requestUrl = HDLCloudUserApi.getRequestUrl(api);
        HdlLogLogic.print("http->发送->" + requestUrl + "\r\n" + body, isAddToMemory);
        //开发环境需要加(用来区分onpro和光伏app代码):HxHttp.builder().headers("x-lbs-version", "hdl-yt")
        return HxHttp.builder().url(requestUrl).raw(body).build().post().subscribeWith(new HDLResponse<String>() {
            @Override
            public void onResponse(String str) {
@@ -377,8 +378,6 @@
        final char[] strChar = valueStr.substring(0, 1).toCharArray();
        final char firstChar = strChar[0];
        //System.out.println("getJSONType firstChar = "+firstChar);
        if (firstChar != '{' && firstChar != '[') return true;
        return false;
        return firstChar != '{' && firstChar != '[';
    }
}