BentleyCloudRpcProtocol Class

An http protocol for Bentley cloud RPC interface deployments.

Extends

Methods

Name Description
constructor(configuration: RpcConfiguration): BentleyCloudRpcProtocol Constructs an HTTP protocol.  
getOperationFromPath(path: string): SerializedRpcOperation Returns the operation specified by an OpenAPI-compatible URI path.  
inflateToken(tokenFromBody: IModelRpcProps, request: SerializedRpcRequest): IModelRpcProps Inflates the IModelRpcProps from the URL path for each request on the backend.  
supplyPathForOperation(operation: RpcOperation, request: undefined | RpcRequest<any>): string Supplies the OpenAPI-compatible URI path for an RPC operation.  

Inherited methods

Name Inherited from Description
fulfill(request: SerializedRpcRequest): Promise<RpcRequestFulfillment> WebAppRpcProtocol Obtains the implementation result on the backend for an RPC operation request.
getCode(status: RpcRequestStatus): number WebAppRpcProtocol Supplies the protocol-specific code corresponding to a status value.
getStatus(code: number): RpcRequestStatus WebAppRpcProtocol Supplies the status corresponding to a protocol-specific code value.
handleOpenApiDescriptionRequest(_req: HttpServerRequest, res: HttpServerResponse): void WebAppRpcProtocol Convenience handler for an OpenAPI description request for an HTTP server.
handleOperationGetRequest(req: HttpServerRequest, res: HttpServerResponse): Promise<void> WebAppRpcProtocol Convenience handler for an RPC operation get request for an HTTP server.
handleOperationPostRequest(req: HttpServerRequest, res: HttpServerResponse): Promise<void> WebAppRpcProtocol Convenience handler for an RPC operation post request for an HTTP server.
isTimeout(code: number): boolean WebAppRpcProtocol Whether an HTTP status code indicates a request timeout.
serialize(request: RpcRequest<any>): Promise<SerializedRpcRequest> WebAppRpcProtocol Serializes a request.
computeContentType(httpType: undefined | | string): RpcContentType Static WebAppRpcProtocol Converts an HTTP content type value to an RPC content type value.

Properties

Name Type Description
checkToken boolean Used by protocols that can transmit IModelRpcProps values natively.  
protocolVersionHeaderName string The name of the RPC protocol version header.  
serializedClientRequestContextHeaderNames SerializedClientRequestContext The name of various HTTP request headers based on client's request context  

Inherited properties

Name Type Inherited from Description
configuration Readonly RpcConfiguration WebAppRpcProtocol The configuration for the protocol.
events Readonly BeEvent<RpcProtocolEventHandler> WebAppRpcProtocol Events raised by the protocol.
events StaticReadonly BeEvent<RpcProtocolEventHandler> WebAppRpcProtocol Events raised by all protocols.
info Abstract OpenAPIInfo WebAppRpcProtocol The OpenAPI-compatible info object for this protocol.
invocationType Readonly undefined WebAppRpcProtocol The RPC invocation class for this protocol.
pathPrefix string WebAppRpcProtocol An optional prefix for RPC operation URI paths.
preserveStreams boolean WebAppRpcProtocol Used by protocols that can transmit stream values natively.
protocolVersion StaticReadonly "1" WebAppRpcProtocol A version code that identifies the RPC protocol capabilties of this endpoint.
requestType Readonly undefined WebAppRpcProtocol The RPC request class for this protocol.
transferChunkThreshold number WebAppRpcProtocol If greater than zero, specifies where to break large binary request payloads.

Defined in

Last Updated: 12 June, 2024