| | |
| | | |
| | | 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) { |
| | |
| | | private Disposable requestPost(String api, String body, CloudCallBeak<String> callBack) { |
| | | String requestUrl = HDLCloudUserApi.getRequestUrl(api); |
| | | HdlLogLogic.print("http->发送->" + requestUrl + "\r\n" + body, isAddToMemory); |
| | | return HxHttp.builder().url(requestUrl).raw(body).build().post().subscribeWith(new HDLResponse<String>() { |
| | | return HxHttp.builder().headers("x-lbs-version", "hdl-yt").url(requestUrl).raw(body).build().post().subscribeWith(new HDLResponse<String>() { |
| | | @Override |
| | | public void onResponse(String str) { |
| | | if (callBack != null) { |
| | |
| | | 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 != '['; |
| | | } |
| | | } |