Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Intraweb for Rest API POST
#10
(11-25-2019, 08:58 PM)ShaneStump Wrote:
(11-25-2019, 08:43 PM)kudzu Wrote: Content Handlers.... are you using them already?

function xxx.Execute(aRequest: THttpRequest; aReply: THttpReply;
  const aPathname: string; aSession: TIWApplication; aParams: TStrings): Boolean;

  if aRequest.CommandType = hcPost then begin
    with TStreamReader.Create(aRequest.PostStream) do try
      xJSON := ReadToEnd;
    finally Free; end;
Howdy Big K!

Thanks for answering.

I have using a TContentBase based handler and when my REST api handler's Execute() is called,  I am trying to figure out how to extract the content from the body of the request.

The aRequest parameter does NOT have a PostStream parameter. I can't see how to retrieve the XML data I sent in the body of the initial request.

What am I missing?

Thanks,

Shane

Sorry that section of code I pulled was from Indy directly although inside of IntraWeb code.

For IntraWeb it does add it to the file list as you were already looking at. I will ask Alexandre to take a look and respond though as I know in some cases you have to take additional steps for certain types of contents.
Reply


Messages In This Thread
Intraweb for Rest API POST - by ShaneStump - 11-25-2019, 08:05 PM
RE: Intraweb for Rest API POST - by kudzu - 11-25-2019, 08:43 PM
RE: Intraweb for Rest API POST - by ShaneStump - 11-25-2019, 08:58 PM
RE: Intraweb for Rest API POST - by kudzu - 11-26-2019, 03:29 PM
RE: Intraweb for Rest API POST - by ShaneStump - 11-25-2019, 10:19 PM
RE: Intraweb for Rest API POST - by ShaneStump - 11-26-2019, 11:33 AM
RE: Intraweb for Rest API POST - by ShaneStump - 11-26-2019, 02:02 PM
RE: Intraweb for Rest API POST - by ShaneStump - 11-26-2019, 03:13 PM
RE: Intraweb for Rest API POST - by kudzu - 11-26-2019, 10:40 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)