Mercurial Hosting > luan
changeset 93:2079455459ac
add more http methods
git-svn-id: https://luan-java.googlecode.com/svn/trunk@94 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Thu, 07 Mar 2013 23:34:32 +0000 |
parents | d03022acea47 |
children | c6633e5f0cc5 |
files | src/luan/lib/HttpLib.java |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/luan/lib/HttpLib.java Thu Mar 07 23:09:01 2013 +0000 +++ b/src/luan/lib/HttpLib.java Thu Mar 07 23:34:32 2013 +0000 @@ -61,6 +61,7 @@ LuanTable resp = new LuanTable(); module.put("response",resp); + req.put( "get_attribute", new LuanJavaFunction(HttpServletRequest.class.getMethod("getAttribute",String.class),request) ); req.put( "get_parameter", new LuanJavaFunction(HttpServletRequest.class.getMethod("getParameter",String.class),request) ); req.put( "get_parameter_values", new LuanJavaFunction(HttpServletRequest.class.getMethod("getParameterValues",String.class),request) ); req.put( "get_header", new LuanJavaFunction(HttpServletRequest.class.getMethod("getHeader",String.class),request) ); @@ -73,6 +74,7 @@ add( resp, "send_redirect", String.class ); add( resp, "send_error", Integer.TYPE, String.class ); + resp.put( "contains_header", new LuanJavaFunction(HttpServletResponse.class.getMethod("containsHeader",String.class),response) ); resp.put( "set_header", new LuanJavaFunction(HttpServletResponse.class.getMethod("setHeader",String.class,String.class),response) ); add( resp, "set_cookie", String.class, String.class, Boolean.TYPE, String.class ); add( resp, "remove_cookie", String.class, String.class );