Skip to main content
HTTP is the default transport for http:// and https:// endpoints. Each query sends a single JSON-RPC POST request using the platform’s fetch API. There is no persistent connection — each call is independent.

Using High-Level Clients

Pass an HTTP URL to connect and CosmJS handles the rest:

Using the HTTP Client Directly

For more control, create an HttpClient and pass it through the CometBFT client layer:
When constructing the CometBFT client manually, you need to know the node’s version. Use Tendermint37Client for Tendermint 0.37, Comet38Client for CometBFT 0.38, or Comet1Client for CometBFT 1.x.

Batching HTTP Requests

HttpBatchClient groups multiple concurrent execute() calls into a single JSON-RPC batch request, reducing HTTP round-trips:
Batching is useful when your application fires many independent queries in rapid succession — for example, fetching balances for a list of addresses.

Next Steps

WebSocket Transport

Use persistent connections and real-time subscriptions.

Custom Endpoints

Attach authentication headers to HTTP and batched clients.

Timeouts

Configure HTTP request and batch timeouts.