comparison core/src/luan/modules/IoLuan.java @ 283:b669cdaf54b7

add URL post; add Http.request.query_string; add web_run.form(); git-svn-id: https://luan-java.googlecode.com/svn/trunk@284 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Tue, 02 Dec 2014 03:34:04 +0000
parents a1fa4fba99de
children a50e88d3547c
comparison
equal deleted inserted replaced
282:38bd29e59a6e 283:b669cdaf54b7
341 } 341 }
342 342
343 @Override public String to_string() { 343 @Override public String to_string() {
344 return url.toString(); 344 return url.toString();
345 } 345 }
346
347 public String post(String postS) throws IOException {
348 return new UrlCall(url).post(postS);
349 }
350
351 @Override LuanTable table() {
352 LuanTable tbl = super.table();
353 try {
354 tbl.put( "post", new LuanJavaFunction(
355 LuanUrl.class.getMethod( "post", String.class ), this
356 ) );
357 } catch(NoSuchMethodException e) {
358 throw new RuntimeException(e);
359 }
360 return tbl;
361 }
346 } 362 }
347 363
348 public static final class LuanFile extends LuanIO { 364 public static final class LuanFile extends LuanIO {
349 private final File file; 365 private final File file;
350 366