diff src/luan/modules/http/Http_test.luan @ 1153:1f4da56abd4f

change http cookies interface
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 04 Feb 2018 20:01:23 -0700
parents bae2d0c2576c
children 4beabb087be6
line wrap: on
line diff
--- a/src/luan/modules/http/Http_test.luan	Sun Feb 04 19:25:12 2018 -0700
+++ b/src/luan/modules/http/Http_test.luan	Sun Feb 04 20:01:23 2018 -0700
@@ -12,7 +12,7 @@
 local Http_test = {}
 
 Http_test.welcome_file = "index.html"
-Http_test.cookie = {}
+Http_test.cookies = {}
 
 function Http_test.get_page(path)
 	Http.request.path = path
@@ -41,7 +41,7 @@
 
 function Http_test.init()
 	Http.request = Http.new_request{}
-	Http.request.cookie = Http_test.cookie
+	Http.request.cookies = Http_test.cookies
 
 	Http.response = Http.new_response{
 
@@ -53,11 +53,15 @@
 		end
 
 		set_cookie = function(name,value)
-			Http_test.cookie[name] = value
+			Http_test.cookies[name] = value
+		end
+
+		set_persistent_cookie = function(name,value)
+			Http_test.cookies[name] = value
 		end
 
 		remove_cookie = function(name)
-			Http_test.cookie[name] = nil
+			Http_test.cookies[name] = nil
 		end
 
 		send_redirect = function(url)