Skip to main content
Version: v10.0.0

getOrpcCallRequest

Encodes a call of the procedure as described by the oRPC RPC protocol, for any base url

  • the client url of a request or the url of a socket. GET sends the input in the data query param. Files and urls over the length limit fall back to POST, the same as the RPCLink of oRPC.

Import
import { getOrpcCallRequest } from "@hyper-fetch/orpc"

Parameters​

getOrpcCallRequest(__namedParameters: { endpoint: string; headers: HeadersInit; method: POST | GET; payload: unknown; queryParams: unknown; serializer: StandardRPCSerializer; url: string })
Parameters
NameTypeDescription
__namedParameters
{ endpoint: string; headers: HeadersInit; method: POST | GET; payload: unknown; queryParams: unknown; serializer: StandardRPCSerializer; url: string }

Returns​

OrpcHttpRequestType