New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@cratestack/runtime-axios

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cratestack/runtime-axios

A typeof-fetch-compatible transport for CrateStack's generated TypeScript RPC client, backed by axios.

latest
Source
npmnpm
Version
0.15.4
Version published
Maintainers
1
Created
Source

@cratestack/runtime-axios

A typeof fetch-compatible transport for CrateStack's generated TypeScript RPC client (transport rpc schemas), backed by axios instead of the global fetch — useful for environments where axios is already the house HTTP client (interceptors, proxy/agent config, request/response transforms you don't want to reimplement).

Usage

import { createAxiosRuntime } from "@cratestack/runtime-axios";
import { CratestackRpcRuntime } from "./generated/runtime"; // your project's generated client
import myAxiosInstance from "./my-axios-instance";

const runtime = new CratestackRpcRuntime("https://api.example.com", {
  fetch: createAxiosRuntime({ instance: myAxiosInstance }), // defaults to the `axios` singleton
});

Every request is issued with validateStatus: () => true — a non-2xx response comes back as a normal Response (so CratestackRpcRuntime/RpcLinks can inspect response.status and decode the server's RpcErrorBody themselves) rather than axios throwing an AxiosError.

Keywords

cratestack

FAQs

Package last updated on 11 Oct 2026

Related posts