use of com.aliyuncs.fc.http.HttpResponse in project fc-java-sdk by aliyun.
the class FunctionComputeClient method listTriggers.
public ListTriggersResponse listTriggers(ListTriggersRequest request) throws ClientException, ServerException {
HttpResponse response = client.doAction(request, CONTENT_TYPE_APPLICATION_JSON, "GET");
ListTriggersResponse listTriggersResponse = GSON.fromJson(new String(response.getContent()), ListTriggersResponse.class);
listTriggersResponse.setHeader(response.getHeaders());
listTriggersResponse.setContent(response.getContent());
listTriggersResponse.setStatus(response.getStatus());
return listTriggersResponse;
}
use of com.aliyuncs.fc.http.HttpResponse in project fc-java-sdk by aliyun.
the class FunctionComputeClient method updateFunction.
public UpdateFunctionResponse updateFunction(UpdateFunctionRequest request) throws ClientException, ServerException {
HttpResponse response = client.doAction(request, CONTENT_TYPE_APPLICATION_JSON, "PUT");
FunctionMetadata functionMetadata = GSON.fromJson(new String(response.getContent()), FunctionMetadata.class);
UpdateFunctionResponse updateFunctionResponse = new UpdateFunctionResponse();
updateFunctionResponse.setFunctionMetadata(functionMetadata);
updateFunctionResponse.setHeader(response.getHeaders());
updateFunctionResponse.setContent(response.getContent());
updateFunctionResponse.setStatus(response.getStatus());
return updateFunctionResponse;
}
use of com.aliyuncs.fc.http.HttpResponse in project fc-java-sdk by aliyun.
the class FunctionComputeClient method getFunctionCode.
public GetFunctionCodeResponse getFunctionCode(GetFunctionCodeRequest request) throws ClientException, ServerException {
HttpResponse response = client.doAction(request, CONTENT_TYPE_APPLICATION_JSON, "GET");
FunctionCodeMetadata functionCodeMetadata = GSON.fromJson(new String(response.getContent()), FunctionCodeMetadata.class);
GetFunctionCodeResponse getFunctionCodeResponse = new GetFunctionCodeResponse();
getFunctionCodeResponse.setFunctionCodeMetadata(functionCodeMetadata);
getFunctionCodeResponse.setHeader(response.getHeaders());
getFunctionCodeResponse.setContent(response.getContent());
getFunctionCodeResponse.setStatus(response.getStatus());
return getFunctionCodeResponse;
}
use of com.aliyuncs.fc.http.HttpResponse in project fc-java-sdk by aliyun.
the class FunctionComputeClient method listFunctions.
public ListFunctionsResponse listFunctions(ListFunctionsRequest request) throws ClientException, ServerException {
HttpResponse response = client.doAction(request, CONTENT_TYPE_APPLICATION_JSON, "GET");
ListFunctionsResponse listFunctionsResponse = GSON.fromJson(new String(response.getContent()), ListFunctionsResponse.class);
listFunctionsResponse.setHeader(response.getHeaders());
listFunctionsResponse.setContent(response.getContent());
listFunctionsResponse.setStatus(response.getStatus());
return listFunctionsResponse;
}
use of com.aliyuncs.fc.http.HttpResponse in project fc-java-sdk by aliyun.
the class FunctionComputeClient method getFunction.
public GetFunctionResponse getFunction(GetFunctionRequest request) throws ClientException, ServerException {
HttpResponse response = client.doAction(request, CONTENT_TYPE_APPLICATION_JSON, "GET");
FunctionMetadata functionMetadata = GSON.fromJson(new String(response.getContent()), FunctionMetadata.class);
GetFunctionResponse getFunctionResponse = new GetFunctionResponse();
getFunctionResponse.setFunctionMetadata(functionMetadata);
getFunctionResponse.setHeader(response.getHeaders());
getFunctionResponse.setContent(response.getContent());
getFunctionResponse.setStatus(response.getStatus());
return getFunctionResponse;
}
Aggregations