Download

Multiple POSTs not working with VARest

I am having difficulty with multiple POSTs to a REST-enabled server. My blueprint’s Event BeginPlay sets up the POST request with the JSON buffer and POST request structure and attaches to callbacks for request complete or failure. During runtime, calls are made to issue this post with a single field (“action”) in the buffer. The first POST with action=HRL_Demo_Abridged goes through just fine (get response code 200 from server), but a subsequent POST with action=done seems to get through the VArest code (I see “LogVaRest: Request (url body): POST …” in UE output log), but the server doesn’t reply. Using wireshark, I noticed that both the first and second POST have a content-length of 24, even though the second one should only be 11. Exactly three minutes after the second POST I get a libcurl error on the output log, i.e., “LogHttp: Warning: 00000260BF1A9300: request failed, libcurl error: 0 (No error)”. Looking at the attached blueprint logic, am I modifying the JSON buffer correctly for the second POST? Can the JSON buffer be reused like I do here?