How to send a json POST to remote (camera) API from Lua script?

ypwlng

New Member
Hello - I would like to send a POST to the camera API from Lua, directly if possible, on change of scene. I do not need to have the responses from the API.

Presently the workarounds I have tried are not suitable or not ideal.

1. os.execute to call Curl - there is a lag, and the scene change is delayed

2. io.popen a Python helper script; LUA ---io pipe---> Helper ---POST---> Camera API. With this it works, but there is the inconvenient cmd console window that needs to be closed/minimised

ChatGPT thinks that there is a "socket.http" library in OBS Lua - but there isn't.

I am using OBS 32.1.1 on Windows 11.

Thank you in advance for any help, suggestions, etc.
 
Back
Top