use of com.aliyuncs.fc.http.HttpResponse in project fc-java-sdk by aliyun.
the class FunctionComputeClient method deleteService.
public DeleteServiceResponse deleteService(DeleteServiceRequest request) throws ClientException, ServerException {
HttpResponse response = client.doAction(request, CONTENT_TYPE_APPLICATION_JSON, "DELETE");
DeleteServiceResponse deleteServiceResponse = new DeleteServiceResponse();
deleteServiceResponse.setHeaders(response.getHeaders());
deleteServiceResponse.setStatus(response.getStatus());
return deleteServiceResponse;
}
use of com.aliyuncs.fc.http.HttpResponse in project fc-java-sdk by aliyun.
the class FunctionComputeClient method invokeFunction.
public InvokeFunctionResponse invokeFunction(InvokeFunctionRequest request) throws ClientException, ServerException {
HttpResponse response = client.doAction(request, CONTENT_TYPE_APPLICATION_STREAM, "POST");
InvokeFunctionResponse invokeFunctionResponse = new InvokeFunctionResponse();
invokeFunctionResponse.setContent(response.getContent());
invokeFunctionResponse.setHeader(response.getHeaders());
invokeFunctionResponse.setStatus(response.getStatus());
return invokeFunctionResponse;
}
use of com.aliyuncs.fc.http.HttpResponse in project fc-java-sdk by aliyun.
the class FunctionComputeClient method deleteFunction.
public DeleteFunctionResponse deleteFunction(DeleteFunctionRequest request) throws ClientException, ServerException {
HttpResponse response = client.doAction(request, CONTENT_TYPE_APPLICATION_JSON, "DELETE");
DeleteFunctionResponse deleteFunctionResponse = new DeleteFunctionResponse();
deleteFunctionResponse.setHeader(response.getHeaders());
deleteFunctionResponse.setStatus(response.getStatus());
return deleteFunctionResponse;
}
use of com.aliyuncs.fc.http.HttpResponse in project fc-java-sdk by aliyun.
the class FunctionComputeClient method updateService.
public UpdateServiceResponse updateService(UpdateServiceRequest request) throws ClientException, ServerException {
HttpResponse response = client.doAction(request, CONTENT_TYPE_APPLICATION_JSON, "PUT");
ServiceMetadata serviceMetadata = GSON.fromJson(new String(response.getContent()), ServiceMetadata.class);
UpdateServiceResponse updateServiceResponse = new UpdateServiceResponse();
updateServiceResponse.setServiceMetadata(serviceMetadata);
updateServiceResponse.setHeader(response.getHeaders());
updateServiceResponse.setContent(response.getContent());
updateServiceResponse.setStatus(response.getStatus());
return updateServiceResponse;
}
use of com.aliyuncs.fc.http.HttpResponse in project fc-java-sdk by aliyun.
the class FunctionComputeClient method createTrigger.
public CreateTriggerResponse createTrigger(CreateTriggerRequest request) throws ClientException, ServerException {
HttpResponse response = client.doAction(request, CONTENT_TYPE_APPLICATION_JSON, "POST");
TriggerMetadata triggerMetadata = GSON.fromJson(new String(response.getContent()), TriggerMetadata.class);
CreateTriggerResponse createTriggerResponse = new CreateTriggerResponse();
createTriggerResponse.setTriggerMetadata(triggerMetadata);
createTriggerResponse.setHeader(response.getHeaders());
createTriggerResponse.setContent(response.getContent());
createTriggerResponse.setStatus(response.getStatus());
return createTriggerResponse;
}
Aggregations