WebAppRpcRequest Class

A web application RPC request.

Extends

Methods

Name Description
constructor(client: RpcInterface, operation: string, parameters: any[]): WebAppRpcRequest Constructs a web application request.  
computeRetryAfter(attempts: number): number Protected    
handleUnknownResponse(code: number): void Protected    
isHeaderAvailable(name: string): boolean Protected Override to describe available headers based on a protocol-specific criteria (such as a CORS whitelist).  
load(): Promise<RpcSerializedValue> Protected Override to load response value.  
send(): Promise<number> Protected Sends the request.  
setHeader(name: string, value: string): void Protected Sets request header values.  
supplyFetch(): (input: RequestInfo, init?: RequestInit) => Promise<Response> Protected Override to supply an alternate fetch function.  
supplyRequest(): { T } Protected Override to supply an alternate Request function.  
computeTransportType(value: RpcSerializedValue, source: any): RpcContentType ProtectedStatic Determines the most efficient transport type for an RPC value.  
parseRequest(protocol: WebAppRpcProtocol, req: HttpServerRequest): Promise<SerializedRpcRequest> Static Parses a request.  
sendResponse(protocol: WebAppRpcProtocol, request: SerializedRpcRequest, fulfillment: RpcRequestFulfillment, res: HttpServerResponse): void Static Sends the response for a web request.  

Inherited methods

Name Inherited from Description
cancel(): void RpcRequest  
findParameterOfType<T>(requiredProperties: { T }): undefined | T RpcRequest Finds the first parameter of a given structural type if present.
findTokenPropsParameter(): undefined | IModelRpcProps RpcRequest Finds the first IModelRpcProps parameter if present.
recordTransientFault(): void Protected RpcRequest  
reject(reason: any): void Protected RpcRequest  
resetTransientFaultCount(): void Protected RpcRequest  
setHeaders(): Promise<void> Protected RpcRequest  
setLastUpdatedTime(): void Protected RpcRequest Sets the last updated time for the request.
submit(): Promise<void> RpcRequest  
current(context: RpcInterface): RpcRequest<any> Static RpcRequest The request for the current RPC operation.

Properties

Name Type Description
maxUrlComponentSize Static number The maximum size permitted for an encoded component in a URL.  
{ message: string, status: number } Standardized access to metadata about the request (useful for purposes such as logging).  
method HttpMethod_T The HTTP method for this request.  
protocol Readonly WebAppRpcProtocol Convenience access to the protocol of this request.  

Inherited properties

Name Type Inherited from Description
_rawPromise Protected Promise<undefined | Response> RpcRequest  
_resolveRaw Protected (value?: Response | PromiseLike<Response>) => void RpcRequest  
_response Protected undefined | Response RpcRequest  
activeRequests Accessor StaticReadOnly ReadonlyMap<string, RpcRequest<any>> RpcRequest All RPC requests that are currently in flight.
aggregateLoad Accessor StaticReadOnly RpcOperationsProfile RpcRequest The aggregate operations profile of all active RPC interfaces.
client Readonly RpcInterface RpcRequest The RPC client instance for this request.
connecting Accessor ReadOnly boolean RpcRequest Whether a connection is active for this request.
elapsed Accessor ReadOnly number RpcRequest The elapsed time for this request.
events StaticReadonly BeEvent<RpcRequestEventHandler> RpcRequest Events raised by RpcRequest.
extendedStatus Accessor ReadOnly string RpcRequest Extended status information for this request (if available).
id Readonly string RpcRequest The unique identifier of this request.
lastSubmitted Accessor ReadOnly number RpcRequest The last submission for this request.
lastUpdated Accessor ReadOnly number RpcRequest The last status update received for this request.
notFoundHandlers StaticReadonly BeEvent<RpcRequestNotFoundHandler> RpcRequest Resolvers for "not found" requests.
operation Readonly RpcOperation RpcRequest The operation for this request.
parameters any[] RpcRequest The parameters for this request.
path string RpcRequest A protocol-specific path identifier for this request.
pending Accessor ReadOnly boolean RpcRequest Whether this request is pending.
rawResponse Accessor ReadOnly Promise<undefined | Response> RpcRequest The raw implementation response for this request.
response Readonly Promise<any> RpcRequest The implementation response for this request.
retryAfter Accessor ReadOnly | number RpcRequest An attempt-specific value for when to next retry this request.
retryInterval number RpcRequest The target interval (in milliseconds) between submission attempts for this request.
status Accessor ReadOnly RpcRequestStatus RpcRequest The status of this request.

Defined in

Last Updated: 11 June, 2024