Mercurial Hosting > luan
comparison src/luan/modules/http/impl/Http.luan @ 1162:e2d2354807f3
minor
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 06 Feb 2018 21:25:55 -0700 |
parents | 6baccd0c85a7 |
children | fef8f0742da9 |
comparison
equal
deleted
inserted
replaced
1161:6baccd0c85a7 | 1162:e2d2354807f3 |
---|---|
23 | 23 |
24 function Http.new_request(java) | 24 function Http.new_request(java) |
25 local this = {} | 25 local this = {} |
26 Http.request = this | 26 Http.request = this |
27 if java == nil then | 27 if java == nil then |
28 this.port = 80 | |
29 this.method = "GET" | 28 this.method = "GET" |
30 this.headers = {} | 29 this.headers = {} |
31 this.parameters = {} | 30 this.parameters = {} |
32 this.cookies = {} | 31 this.cookies = {} |
33 else | 32 else |
34 this.java = java | 33 this.java = java |
35 this.port = java.port or error() | |
36 this.method = java.method or error() | 34 this.method = java.method or error() |
37 this.raw_path = java.rawPath or error() | 35 this.raw_path = java.rawPath or error() |
38 this.path = java.path or error() | 36 this.path = java.path or error() |
39 this.protocol = java.protocol or error() | 37 this.protocol = java.protocol or error() |
40 this.headers = LuanJava.toLuan(java.headers) | 38 this.headers = LuanJava.toLuan(java.headers) |