mirror of
https://github.com/apache/cloudstack
synced 2026-08-11 08:28:00 +00:00
ApiResponseSerializer: Use HttpUtils instead of BaseCmd
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
d64d59e8f7
commit
983252cffd
@ -21,6 +21,7 @@ import com.cloud.api.ApiResponseGsonHelper;
|
||||
import com.cloud.api.ApiServer;
|
||||
import com.cloud.serializer.Param;
|
||||
import com.cloud.user.Account;
|
||||
import com.cloud.utils.HttpUtils;
|
||||
import com.cloud.utils.encoding.URLEncoder;
|
||||
import com.cloud.utils.exception.CloudRuntimeException;
|
||||
import com.cloud.utils.exception.ExceptionProxyObject;
|
||||
@ -54,7 +55,7 @@ public class ApiResponseSerializer {
|
||||
|
||||
public static String toSerializedString(ResponseObject result, String responseType) {
|
||||
s_logger.trace("===Serializing Response===");
|
||||
if (BaseCmd.RESPONSE_TYPE_JSON.equalsIgnoreCase(responseType)) {
|
||||
if (HttpUtils.RESPONSE_TYPE_JSON.equalsIgnoreCase(responseType)) {
|
||||
return toJSONSerializedString(result);
|
||||
} else {
|
||||
return toXMLSerializedString(result);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user