comparison Core/RestApi/RestApiOutput.cpp @ 1519:8bd0d897763f

refactoring: IHttpStreamAnswer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 11 Aug 2015 13:15:16 +0200
parents eb46cc06389a
children 3606278d305e
comparison
equal deleted inserted replaced
1518:eb46cc06389a 1519:8bd0d897763f
76 throw OrthancException(ErrorCode_BadSequenceOfCalls); 76 throw OrthancException(ErrorCode_BadSequenceOfCalls);
77 } 77 }
78 } 78 }
79 79
80 80
81 void RestApiOutput::AnswerFile(HttpFileSender& sender) 81 void RestApiOutput::AnswerStream(IHttpStreamAnswer& stream)
82 { 82 {
83 CheckStatus(); 83 CheckStatus();
84 sender.Send(output_); 84 output_.Answer(stream);
85 alreadySent_ = true; 85 alreadySent_ = true;
86 } 86 }
87 87
88 void RestApiOutput::AnswerJson(const Json::Value& value) 88 void RestApiOutput::AnswerJson(const Json::Value& value)
89 { 89 {