EMS.ResourceTypes.TEMSCommonResource.DoCanHandleRequest

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type: function
Visibility: protected
Source:
EMS.ResourceTypes.pas
EMS.ResourceTypes.hpp
Unit: EMS.ResourceTypes
Parent: TEMSCommonResource

Delphi

function DoCanHandleRequest(const AContext: TEndpointContext;
out AEndpointName: string): Boolean; override;

C++

virtual bool __fastcall DoCanHandleRequest(Ems::Resourceapi::TEndpointContext* const AContext, /* out */ System::UnicodeString &AEndpointName);

Description

If this EMS resource can handle the specified request context, DoCanHandleRequest returns True and fills AEndpointName with the name of the endpoint of the EMS resource that can handle the specified request context. If this EMS resource cannot handle the specified request context, DoCanHandleRequest returns False.

CanHandleRequest calls DoCanHandleRequest.

If two or more endpoints can handle the specified request context, DoCanHandleRequest raises an EEMSError exception with the following message:

Duplicate endpoints: <number>. Each endpoint must have a different HTTP method or URL