SecureBlackbox 2020 C++ Edition

Questions / Feedback?

CustomRequest Event

Reports a request of a non-standard type (method).

Syntax

ANSI (Cross Platform)
virtual int FireCustomRequest(RESTServerCustomRequestEventParams *e);
typedef struct {
int64 ConnectionID;
const char *URI;
const char *HTTPMethod;
int Handled; int reserved; } RESTServerCustomRequestEventParams; Unicode (Windows) virtual INT FireCustomRequest(RESTServerCustomRequestEventParams *e);
typedef struct {
LONG64 ConnectionID;
LPCWSTR URI;
LPCWSTR HTTPMethod;
BOOL Handled; INT reserved; } RESTServerCustomRequestEventParams;
- (void)onCustomRequest:(long long)connectionID :(NSString*)URI :(NSString*)HTTPMethod :(int*)handled;
#define EID_RESTSERVER_CUSTOMREQUEST 5

virtual INT SECUREBLACKBOX_CALL FireCustomRequest(LONG64 &lConnectionID, LPSTR &lpszURI, LPSTR &lpszHTTPMethod, BOOL &bHandled);

Remarks

The class fires this event to notify the application about a non-standard request received from the client. The HTTPMethod contains the non-standard HTTP method.

ConnectionID indicates the connection that sent the request and URI suggests the requested resource.

Set Handled to true to indicate that your application's code will take care of the request. The application does it by providing the necessary details via SetResponseStatus, SetResponseHeader, and SetResponseFile methods. If the returned value of Handled is false, the server will try to take care of the request automatically by searching for the requested resource in DocumentRoot.

Copyright (c) 2022 /n software inc. - All rights reserved.
SecureBlackbox 2020 C++ Edition - Version 20.0 [Build 8166]