comparison src/luan/modules/http/Http_test.luan @ 1160:4beabb087be6

add http/impl
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 05 Feb 2018 22:33:59 -0700
parents 1f4da56abd4f
children f8dd726bd4f5
comparison
equal deleted inserted replaced
1159:3ef883468fd0 1160:4beabb087be6
38 } 38 }
39 return Http_test.result.read_text() 39 return Http_test.result.read_text()
40 end 40 end
41 41
42 function Http_test.init() 42 function Http_test.init()
43 Http.request = Http.new_request{} 43 Http.request = Http.new_request()
44 Http.request.cookies = Http_test.cookies 44 Http.request.cookies = Http_test.cookies
45 45
46 Http.response = Http.new_response{ 46 Http.response = {
47
48 headers = {}
49
50 status = Http.STATUS.OK
47 51
48 text_writer = function() 52 text_writer = function()
49 Http.sent_headers(Http.response.headers)
50 Http_test.result = Io.uri "string:" 53 Http_test.result = Io.uri "string:"
51 Http_test.text_writer = Http_test.result.text_writer() 54 Http_test.text_writer = Http_test.result.text_writer()
52 return Http_test.text_writer 55 return Http_test.text_writer
53 end 56 end
54 57