lbuelvas Posted June 29, 2019 Share Posted June 29, 2019 Hi, i'm trying to use UniGUI as a REST server, and i was doing good until i got stuck trying to figure out a way to read the body of a POST request, in uniserver module there is this event UniGUIServerModuleHTTPCommand, i'm being able to send responses, but i need to do some things depending on the contents of the POST method, hope you can help me, i guess it has something to do with the class/instance "ARequestInfo" but i cant figure out how, thanks in advance. Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted June 30, 2019 Share Posted June 30, 2019 var Stream : TStream; PostBody : string; begin if ARequestInfo.Command = 'POST' then begin Stream := ARequestInfo.PostStream; if assigned(Stream) then begin Stream.Position := 0; PostBody := ReadStringFromStream(Stream); end end end; 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now