use of com.thoughtworks.go.api.representers.JsonReader in project gocd by gocd.
the class PipelineOperationsControllerV1Delegate method pause.
public String pause(Request req, Response res) throws IOException {
HttpLocalizedOperationResult result = new HttpLocalizedOperationResult();
JsonReader requestBody = GsonTransformer.getInstance().jsonReaderFrom(req.body());
String pipelineName = req.params("pipeline_name");
String pauseCause = requestBody.optString("pause_cause").orElse(null);
pipelinePauseService.pause(pipelineName, pauseCause, currentUsername(), result);
return renderHTTPOperationResult(result, req, res, localizer);
}
Aggregations