Skip to Content
API ReferenceAPI Reference

API Reference

@routar/core

ExportDescription
endpoint()Define a single typed endpoint
defineRouter()Group endpoints under a URL prefix
createApi()Build a typed API client from executor + router
createExecutor()Wrap a transport function with plugins
dispatchExecutor()Select a transport per request at runtime
createFetchExecutor()Built-in fetch executor
HttpErrorThrown by createFetchExecutor on non-2xx responses
definePluginCreate a custom executor plugin
loggerBuilt-in logging plugin
TimeoutErrorThrown when a createFetchExecutor timeout fires
ValidationErrorThrown when request/response validation fails
ApiTypes<TApi>Utility type to extract request/response types from an API client
PathParams<TPath>Utility type to extract :param names from a path
Last updated on