Web.HTTPApp.TContentParser.CanParse
Delphi
class function CanParse(AWebRequest: TWebRequest): Boolean; override;
C++
__classmethod virtual bool __fastcall CanParse(TWebRequest* AWebRequest);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Web.HTTPApp.pas Web.HTTPApp.hpp |
Web.HTTPApp | TContentParser |
Description
Indicates whether a specified request message contains information encoded in a way that this parser understands.
CanParse indicates whether a content parser class can handle parsing a specified request message. CanParse is a static class method, which means the Web request does not need an instantiated object to call this method. The Web request object calls the CanParse method of every registered content parser until it finds one that can parse its content.
AWebRequest is the current HTTP request message.
CanParse returns true if this class can parse AWebRequest, false if AWebRequest does not indicate an encoding that this class understands.
In TContentParser, CanParse always returns true. TContentParser is always the last content parser that the Web request object checks, and provides the default parsing when no other parser is available.