Comparison

net/http.lua @ 8115:375cf924fce1

net.http: Add request.url, which is the original full URL as a string
author Matthew Wild <mwild1@gmail.com>
date Fri, 21 Apr 2017 16:42:25 +0100
parent 8114:12df41a5a4b1
child 8121:a33a87f13155
child 8195:3accfae91946
comparison
equal deleted inserted replaced
8114:12df41a5a4b1 8115:375cf924fce1
123 return ...; 123 return ...;
124 end 124 end
125 125
126 local function request(self, u, ex, callback) 126 local function request(self, u, ex, callback)
127 local req = url.parse(u); 127 local req = url.parse(u);
128 req.url = u;
128 129
129 if not (req and req.host) then 130 if not (req and req.host) then
130 callback("invalid-url", 0, req); 131 callback("invalid-url", 0, req);
131 return nil, "invalid-url"; 132 return nil, "invalid-url";
132 end 133 end