I'm looking into using lua-requests in an application that uses a Copas event loop. Peeking into the module, I realized I can achieve this doing:
local copas_http = require("copas.http")
local requests = require("requests")
requests.http_socket = copas_http
requests.https_socket = copas_http
...but this doesn't seem documented in the API, and I'd prefer not to rely on undocumented features.
I do see requests.http_socket and requests.http_socket are public fields in the module, though, so maybe if they were meant to be an implementation detail they'd be hidden in _requests. Is the intention of these two fields to be user-tweakable like I'm doing above? If so, would it be possible to document this explicitly in the API? Thank you!!
Hi,
I'm looking into using
lua-requests
in an application that uses a Copas event loop. Peeking into the module, I realized I can achieve this doing:...but this doesn't seem documented in the API, and I'd prefer not to rely on undocumented features.
I do see
requests.http_socket
andrequests.http_socket
are public fields in the module, though, so maybe if they were meant to be an implementation detail they'd be hidden in_requests
. Is the intention of these two fields to be user-tweakable like I'm doing above? If so, would it be possible to document this explicitly in the API? Thank you!!