Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IWServerControllerBaseExecuteRequest Event
#1
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.
Reply
#2
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,
Reply
#3
(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!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)