Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
A flexible HTTP client for making requests with customizable options and a builder pattern for easy configuration.
A simple and flexible HTTP client for making requests with customizable options. This module provides an easy-to-use interface for sending GET, POST, PUT, PATCH, and DELETE requests, along with a builder pattern for configuring the request.
The HttpClient
class allows setting request parameters such as headers, body,
timeout, credentials, and more. It supports various response types such as JSON,
text, blobs, and streams. Additionally, it allows for advanced options like custom
fetch implementations, cache control, and more.
Usage:
const client = new HttpClient({ baseUrl: 'https://jsonplaceholder.typicode.com' }); // Sending a GET request const response = await client.get('todos', 1).json(); // Sending a POST request with JSON body const response = await client.post('todos').body({ key: 'value' }).json();
Add Package
deno add jsr:@rj/http
Import symbol
import * as http from "@rj/http";
---- OR ----
Import directly with a jsr specifier
import * as http from "jsr:@rj/http";
Add Package
npx jsr add @rj/http
Import symbol
import * as http from "@rj/http";
Add Package
yarn dlx jsr add @rj/http
Import symbol
import * as http from "@rj/http";
Add Package
pnpm dlx jsr add @rj/http
Import symbol
import * as http from "@rj/http";
Add Package
bunx jsr add @rj/http
Import symbol
import * as http from "@rj/http";