Skip to main content
Home

latest

Alysia eden HTTP client for Angular

This package works with Node.js, BrowsersIt is unknown whether this package works with Cloudflare Workers, Deno, Bun
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
It is unknown whether this package works with Deno
It is unknown whether this package works with Bun
This package works with Browsers
JSR Score
100%
Published
2 years ago (0.0.3)

EdenClient for Angular using Elysia Framework

EdenClient is a TypeScript-based client designed to interact seamlessly with APIs built using the Elysia framework. It leverages RxJS for observables and integrates with Angular's HttpClient for making HTTP requests, providing a type-safe way to communicate with your backend services.

Features

  • Type-Safe API Calls: Generate type-safe API clients automatically from your Elysia schema.
  • File Handling: Simplified file uploads with built-in support for File and FileList.
  • Error Handling: Advanced error handling capabilities, mapping HTTP error statuses to EdenFetchError instances.
  • Observable Responses: Utilizes RxJS observables for handling asynchronous data and error flows.

Installation

EdenClient can be installed using various package managers. Choose the one that matches your project's environment:

Deno

import * as mod from "jsr:@treaty/httpclient@0.0";

NPM

npx jsr i @treaty/httpclient
import * as mod from "@treaty/httpclient";

Yarn

yarn dlx jsr i @treaty/httpclient
import * as mod from "@treaty/httpclient";

pnpm

pnpm dlx jsr i @treaty/httpclient
import * as mod from "@treaty/httpclient";

Bun

bunx jsr i @treaty/httpclient
import * as mod from "@treaty/httpclient";

Basic Usage

To start using EdenClient with your Elysia-based API, you first need to create an instance of the client by specifying the base URL of your API:

import { edenClient } from '@treaty/httpclient';

const client = edenClient<App>('http://localhost:5555').api;

Replace App with your application's specific type that describes your API schema.

License

EdenClient is IDGAF-1.0 licensed.

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@treaty/httpclient

Import symbol

import * as httpclient from "@treaty/httpclient";
or

Import directly with a jsr specifier

import * as httpclient from "jsr:@treaty/httpclient";

Add Package

pnpm i jsr:@treaty/httpclient
or (using pnpm 10.8 or older)
pnpm dlx jsr add @treaty/httpclient

Import symbol

import * as httpclient from "@treaty/httpclient";

Add Package

yarn add jsr:@treaty/httpclient
or (using Yarn 4.8 or older)
yarn dlx jsr add @treaty/httpclient

Import symbol

import * as httpclient from "@treaty/httpclient";

Add Package

vlt install jsr:@treaty/httpclient

Import symbol

import * as httpclient from "@treaty/httpclient";

Add Package

npx jsr add @treaty/httpclient

Import symbol

import * as httpclient from "@treaty/httpclient";

Add Package

bunx jsr add @treaty/httpclient

Import symbol

import * as httpclient from "@treaty/httpclient";