WebAppRpcProtocol Class

The HTTP application protocol.

Extends

Extended by

Methods

Name Description
constructor(configuration: RpcConfiguration): WebAppRpcProtocol Constructs an HTTP protocol.  
getCode(status: RpcRequestStatus): number Supplies the protocol-specific code corresponding to a status value.  
getStatus(code: number): RpcRequestStatus Supplies the status corresponding to a protocol-specific code value.  
handleOpenApiDescriptionRequest(_req: HttpServerRequest, res: HttpServerResponse): void Convenience handler for an OpenAPI description request for an HTTP server.  
handleOperationGetRequest(req: HttpServerRequest, res: HttpServerResponse): Promise<void> Convenience handler for an RPC operation get request for an HTTP server.  
handleOperationPostRequest(req: HttpServerRequest, res: HttpServerResponse): Promise<void> Convenience handler for an RPC operation post request for an HTTP server.  
isTimeout(code: number): boolean Whether an HTTP status code indicates a request timeout.  
computeContentType(httpType: string | null | undefined): RpcContentType Static Converts an HTTP content type value to an RPC content type value.  

Inherited methods

Name Inherited from Description
fulfill(request: SerializedRpcRequest): Promise<RpcRequestFulfillment> RpcProtocol Obtains the implementation result on the backend for an RPC operation request.
getOperationFromPath(path: string): SerializedRpcOperation RpcProtocol Override to supply the operation for a protocol-specific path value.
inflateToken(tokenFromBody: IModelTokenProps, _request: SerializedRpcRequest): IModelTokenProps RpcProtocol If checkToken is true, will be called on the backend to inflate the IModelToken for each request.
serialize(request: RpcRequest): Promise<SerializedRpcRequest> RpcProtocol Serializes a request.
supplyPathForOperation(operation: RpcOperation, _request: RpcRequest | undefined): string RpcProtocol Override to supply the protocol-specific path value for an RPC operation.

Properties

Name Type Description
info Abstract OpenAPIInfo The OpenAPI-compatible info object for this protocol.  
pathPrefix string An optional prefix for RPC operation URI paths.  
preserveStreams boolean    
requestType WebAppRpcRequest The RPC request class for this protocol.  

Inherited properties

Name Type Inherited from Description
checkToken boolean RpcProtocol Used by protocols that can transmit IModelToken values natively.
configuration RpcConfiguration RpcProtocol The configuration for the protocol.
events Static BeEvent<RpcProtocolEventHandler> RpcProtocol Events raised by all protocols.
events BeEvent<RpcProtocolEventHandler> RpcProtocol Events raised by the protocol.
invocationType RpcInvocation RpcProtocol The RPC invocation class for this protocol.
transferChunkThreshold number RpcProtocol If greater than zero, specifies where to break large binary request payloads.

Object Literals

Name Description
serializedClientRequestContextHeaderNames  

Defined in

Last Updated: 08 January, 2020