Sending synchronous http request in prosody


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.



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 …

thank you! @damencho much appreciated.