From RAD Studio API Documentation
Jump to: navigation, search



TAbstractContentParser = class(TObject)


class PASCALIMPLEMENTATION TAbstractContentParser : public System::TObject


Type Visibility Source Unit Parent
class public


TAbstractContentParser is the base class for objects that parse the content of an HTTP request.

Web request objects use a descendant of TAbstractContentParser to retrieve information about the named values in the content of the HTTP request they represent. TAbstractContentParser defines two protected methods, GetContentFields and GetFiles, which the Web request uses to obtain values for its ContentFields and Files properties, respectively.

TAbstractContentParser should not be instantiated. The GetContentFields and GetFiles methods are abstract or, in C++ terminology, pure virtual, which means that TAbstractContentParser does not supply an implementation. Each TAbstractContentParser descendant overrides these methods to support its own method of extracting named value strings and uploaded files from an HTTP request. The TAbstractContentParser descendant also overrides the public CanParse method to check whether the request message contains information encoded in a way that the content parser understands.

Each TAbstractContentParser descendant registers itself with the Web server application. Then, when a Web request object needs to parse its content to set the ContentFields and Files properties, it searches through the registered content parsers to locate the most recently registered parser that can parse the current content.

See Also