tsentials-http

Community

Fetch APIs without try/catch chaos.

Authorsenrecep
Version1.0.0
Installs0

System Documentation

What problem does it solve?

It eliminates repetitive error handling in TypeScript HTTP calls by returning a Result<T> for both success and failure responses instead of throwing exceptions or forcing manual try/catch logic.

Core Features & Use Cases

  • fetchResult wrapper: Perform get/post/put/patch/delete requests and receive Promise<Result<T>> where 2xx becomes success and 4xx/5xx becomes failure.
  • RequestBuilder fluent API: Build headers, query parameters, and JSON or raw bodies with a terminal .send<T>() call for typed responses.
  • Error mapping and parsing: Convert HTTP status codes into AppError via httpStatusToError and extract human-readable details from RFC 9457 ProblemDetails via extractErrorDescription.

Quick Start

Use tsentials-http to call an endpoint and handle errors via Result<T> rather than exceptions by writing a single RequestBuilder flow that ends with .send<User>().

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: tsentials-http
Download link: https://github.com/senrecep/tsentials/archive/main.zip#tsentials-http

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.