rokojori_action_library/Tools/mcp/PendingRequest.cs

26 lines
788 B
C#

#if TOOLS
using System.Net;
namespace Rokojori.Tools
{
// A raw HTTP request body + its response, captured by the HTTP callback thread and handed
// off untouched. Parsing the body (JSON.Parse, via the shared JSON library) and all protocol/
// tool dispatch happens later on the main thread - not here, since that parsing can itself log
// through RJLog (a Godot engine API) on malformed input, which is only safe from the main
// thread. The callback thread's job ends at reading bytes in and, later, writing bytes out.
public class PendingRequest
{
public string body;
public HttpListenerResponse response;
public PendingRequest( string body, HttpListenerResponse response )
{
this.body = body;
this.response = response;
}
}
}
#endif