I’m trying to write an addon and want to reply to a request in the request function here. How do I intercept this request and respond to it as if I am the server my device wants to connect too. The functionality I’m looking for is something like the below
def request(self, flow): resp = http.HTTPResponse( http_version=b"HTTP/2.0", status_code=200, reason=b'OK', headers=flow.request.headers, content=the content I want to send to my device ) flow.reply.send(resp)
However I can’t find anything like this. Any information would be helpful.