client.request(method, path, body?). It sends GET or POST with JSON and uses the client’s API key when set.
Signature
- method:
"GET"or"POST". - path: Path including query string (e.g.
/chain/all?page=1&pageSize=20). - body: Optional object for POST (sent as JSON).
- Returns: Parsed JSON as
T.
Examples
Query parameters
Build the path withURLSearchParams or template strings:
Errors
On non-2xx responses,request() throws with the response body text. Use try/catch to handle errors.
