/*!
 * qwebs
 * Copyright(c) 2016 Benoît Claveau
 * MIT Licensed
 */

"use strict";

class InfoService {
	constructor() {	
	};
	
	whoiam() {
		return "I'm Info service.";
	};

	getInfo(request, response) {
		let content = {
			whoiam: this.whoiam()
		};
		return response.send({ request: request, content: content });
	};

	getMessage(request, response) {
		let content = {
			text: "hello world"
		};
		return response.send({ request: request, content: content });
	};
	
	save(request, response) {
		let content = {
			status: "saved"
		};
		return response.send({ request: request, content: content });
	};
	
	update(request, response) {
		let content = {
			status: "updated"
		};
		return response.send({ request: request, content: content });
	};
	
	delete(request, response) {
		let content = {
			status: "deleted"
		};
		return response.send({ request: request, content: content });
	};

        redirect(request, response) {
                return response.redirect({ url: "get" });
        }
};

exports = module.exports = InfoService;

@@ -78,16 +78,62 @@
 rict%22;%0A%0A
+const Readable = require('stream').Readable;%0A%0A
 class In
@@ -401,31 +401,72 @@
 %7B%0A%09%09let 
-content = %7B%0A%09%09%09
+source = new Readable;%0A%09%09setTimeout(() =%3E source.push(%7B 
 text: %22h
@@ -476,20 +476,26 @@
 o world%22
-%0A%09%09%7D
+ %7D), 1000)
 ;%0A%09%09retu
@@ -531,32 +531,66 @@
 equest, 
-content:
+stream: source %7D); //use stream instead of
  content
  %7D);%0A%09%7D;
@@ -573,36 +573,34 @@
 stead of content
- %7D);
+%09%09
 %0A%09%7D;%0A%09%0A%09save(req

Update info.js