net.http: http.request() promise now resolves with response (breaking change)
Promise mode is not (widely?) used, changing this now while we can, as it
improves usability of the API.
The request is now available as response.request, if needed.
--- a/net/http.lua Tue Aug 25 15:57:39 2020 +0100
+++ b/net/http.lua Tue Aug 25 15:59:04 2020 +0100
@@ -293,7 +293,8 @@
if code == 0 then
reject(http_errors.new(body, { request = a }));
else
- resolve({ request = b, response = a });
+ a.request = b;
+ resolve(a);
end
end);
end);