Re: [Lazarus] TFPHTTPServer

2023-02-23 Thread duilio foschi via lazarus
that was it. Thanks a lot

Peppe

On Thu, Feb 23, 2023 at 11:07 AM Michael Van Canneyt via lazarus
 wrote:
>
>
>
> On Thu, 23 Feb 2023, duilio foschi via lazarus wrote:
>
> > I wrote a simple server using TFPHTTPServer.
> >
> > All incoming calls are processed using
> > procedure HandleRequest(var ARequest: TFPHTTPConnectionRequest;
> > var AResponse: TFPHTTPConnectionResponse);
> >
> > My first tests were ok and encouraging but... how do I know if the
> > call was a GET or a POST?
> >
> > I guess that ARequest "knows" it, but I cannot find a way to ask :)
>
> Try ARequest.Method, this is the HTTP method string as sent by the client.
>
> Michael.
> --
> ___
> lazarus mailing list
> lazarus@lists.lazarus-ide.org
> https://lists.lazarus-ide.org/listinfo/lazarus
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] TFPHTTPServer

2023-02-23 Thread Michael Van Canneyt via lazarus




On Thu, 23 Feb 2023, duilio foschi via lazarus wrote:


I wrote a simple server using TFPHTTPServer.

All incoming calls are processed using
procedure HandleRequest(var ARequest: TFPHTTPConnectionRequest;
var AResponse: TFPHTTPConnectionResponse);

My first tests were ok and encouraging but... how do I know if the
call was a GET or a POST?

I guess that ARequest "knows" it, but I cannot find a way to ask :)


Try ARequest.Method, this is the HTTP method string as sent by the client.

Michael.
--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] TFPHTTPServer

2023-02-23 Thread duilio foschi via lazarus
I wrote a simple server using TFPHTTPServer.

All incoming calls are processed using
procedure HandleRequest(var ARequest: TFPHTTPConnectionRequest;
 var AResponse: TFPHTTPConnectionResponse);

My first tests were ok and encouraging but... how do I know if the
call was a GET or a POST?

I guess that ARequest "knows" it, but I cannot find a way to ask :)

Thank you

Peppe Polpo
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus