comparison src/luan/modules/http/Http.luan @ 1280:781ec0a92bb5

add Boot.luan
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 20 Dec 2018 13:38:16 -0700
parents 382c444a6c77
children 5763597ca5c0
comparison
equal deleted inserted replaced
1279:323743a7f317 1280:781ec0a92bb5
12 local Package = require "luan:Package.luan" 12 local Package = require "luan:Package.luan"
13 local String = require "luan:String.luan" 13 local String = require "luan:String.luan"
14 local lower = String.lower or error() 14 local lower = String.lower or error()
15 local matches = String.matches or error() 15 local matches = String.matches or error()
16 local trim = String.trim or error() 16 local trim = String.trim or error()
17 local IoLuan = require "java:luan.modules.IoLuan" 17 local Boot = require "luan:Boot.luan"
18 local LuanJava = require "java:luan.Luan" 18 local LuanJava = require "java:luan.Luan"
19 local Request = require "java:luan.webserver.Request" 19 local Request = require "java:luan.webserver.Request"
20 local Response = require "java:luan.webserver.Response" 20 local Response = require "java:luan.webserver.Response"
21 local ResponseOutputStream = require "java:luan.webserver.ResponseOutputStream" 21 local ResponseOutputStream = require "java:luan.webserver.ResponseOutputStream"
22 local Status = require "java:luan.webserver.Status" 22 local Status = require "java:luan.webserver.Status"
132 132
133 function this.text_writer() 133 function this.text_writer()
134 this.writer and "writer already set" 134 this.writer and "writer already set"
135 this.writer = ResponseOutputStream.new(this.java) 135 this.writer = ResponseOutputStream.new(this.java)
136 this.writer = OutputStreamWriter.new(this.writer) 136 this.writer = OutputStreamWriter.new(this.writer)
137 return IoLuan.textWriter(this.writer) 137 return Boot.text_writer(this.writer)
138 end 138 end
139 139
140 function this.binary_writer() 140 function this.binary_writer()
141 this.writer and "writer already set" 141 this.writer and "writer already set"
142 this.writer = ResponseOutputStream.new(this.java) 142 this.writer = ResponseOutputStream.new(this.java)
143 return IoLuan.binaryWriter(this.writer) 143 return Boot.binary_writer(this.writer)
144 end 144 end
145 145
146 return this 146 return this
147 end 147 end
148 148