|
@@ -17,6 +17,7 @@ import org.apache.http.client.methods.HttpPut;
|
|
|
import org.apache.http.entity.InputStreamEntity;
|
|
|
import org.apache.http.impl.client.CloseableHttpClient;
|
|
|
import org.apache.http.impl.client.HttpClients;
|
|
|
+import org.apache.http.util.EntityUtils;
|
|
|
|
|
|
import com.upyun.UpException;
|
|
|
import com.upyun.UpYunUtils;
|
|
@@ -107,6 +108,7 @@ public class UpYunClient {
|
|
|
httpPut.setEntity(new InputStreamEntity(in));
|
|
|
CloseableHttpResponse response = httpclient.execute(httpPut);
|
|
|
int statusCode = response.getStatusLine().getStatusCode();
|
|
|
+ System.out.println(EntityUtils.toString(response.getEntity(), "UTF-8"));
|
|
|
if (HttpStatus.SC_OK != statusCode) {
|
|
|
throw new StatusException("EX-100001", "upyun upload failure!");
|
|
|
}
|