Atozed Forums

Full Version: IWServerControllerBaseExecuteRequest Event
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello.
I'm new to IW and would like to know how I could capture the body of a post request. I am using the "IWServerControllerBaseExecuteRequest" event. The body I am trying to retrieve is a JSON. I hope you can guide me, since the IW.HTTP.Request.THttpRequest object does not have a ContentStream or something similar.
Quote:Hello.
I'm new to IW and would like to know how I could capture the body of a post request. I am using the "IWServerControllerBaseExecuteRequest" event. The body I am trying to retrieve is a JSON. I hope you can guide me, since the IW.HTTP.Request.THttpRequest object does not have a ContentStream or something similar.

Hi Mario,

all content of the body received by IntraWeb is saved to a file (because it can be anything from 1kb to several Gb in size).

The best way to handle this is via a content handler.

Please check this example:

https://github.com/Atozed/IntraWeb/tree/...stDataDemo

In this case IW receives a XML content stream, but it is no different from implementing a JSON content stream.

Please let me know if the example is clear enough for you to handle your case.

Cheers,
(07-31-2024, 07:17 AM)Alexandre Machado Wrote: [ -> ]
Quote:Hello.
I'm new to IW and would like to know how I could capture the body of a post request. I am using the "IWServerControllerBaseExecuteRequest" event. The body I am trying to retrieve is a JSON. I hope you can guide me, since the IW.HTTP.Request.THttpRequest object does not have a ContentStream or something similar.

Hi Mario,

all content of the body received by IntraWeb is saved to a file (because it can be anything from 1kb to several Gb in size).

The best way to handle this is via a content handler.

Please check this example:

https://github.com/Atozed/IntraWeb/tree/...stDataDemo

In this case IW receives a XML content stream, but it is no different from implementing a JSON content stream.

Please let me know if the example is clear enough for you to handle your case.

Cheers,


Hello Alexandre.
Thank you so much. With this demo I can handle myself super well!