Sending synchronous http request in prosody

Hi,

I’m trying to send synchronous http request with available modules like net.http or or using socket.http and using ltn12, net.http uses callbacks which is async and ltn12 throws me an error whenever I try to load Attempt to set a global: ltn12 = table: 0x560363a16650.

Is there any way I can send out a sync http request.

@damencho

Thanks…

I don’t think so, and you don’t want to do that as prosody is single threaded and you will block any other operation going on till this request finishes.
This is an example … https://github.com/jitsi/jitsi-meet/blob/master/resources/prosody-plugins/token/util.lib.lua#L130

thank you! @damencho much appreciated.