SShortSingh.
Back to feed

Developer releases Angular library to eliminate repetitive HttpClient boilerplate code

0
·5 views

A developer has released version 3.0 of @arxis/api, an open-source Angular library designed to reduce repetitive HTTP service code in Angular 17+ applications. The library introduces a provideApi() configuration function that lets developers set a base API URL and global headers once at the app level, rather than repeating them across every service. An injectable ApiService then replaces direct HttpClient usage, exposing typed get, post, put, patch, and delete methods that handle URL construction and headers automatically. The wrapper does not create its own HTTP stack, meaning existing Angular features such as interceptors, server-side rendering, and HttpTestingController continue to work without modification. Multiple API backends can be supported by either extending ApiService with a custom subclass or by scoping a separate provideApi() call to a lazy-loaded route.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Developer Launches Technical Blog to Share Full-Stack Engineering Insights

A software engineer has launched a technical blog aimed at sharing real-world engineering challenges and architectural patterns with the developer community. The author works across a stack that includes React, TypeScript, React Native, and backend infrastructure involving database design and API integrations. The blog plans to cover topics such as full-stack architecture breakdowns, advanced TypeScript patterns, mobile app deployment with Expo, and freelance development practices. Content is intended for fellow engineers, engineering managers, and recruiters interested in practical, in-depth technical knowledge. The first technical article is expected to be published soon.

0
ProgrammingDEV Community ·

Pin Object Identity in Tests Before Extracting Mutating Functions

Software developers are advised to freeze object identity checks in tests before extracting any single mutating function from a shared module. Value-based assertions alone can miss alias bugs, since a copied list may pass item checks while silently altering the original object's order or structure. The guidance focuses specifically on in-place container mutations, recommending that developers capture object IDs of mutable arguments before and after each function call to detect unexpected identity changes. A reference table categorizes common leaf-function behaviors — such as in-place sorting or nested dict aliasing — and indicates which are safe to extract only when identity contracts remain stable. The proposal includes a draft test harness to track container IDs and mapping key changes, intended to be adapted locally before any code restructuring begins.

0
ProgrammingDEV Community ·

Termai: A Lightweight AI Terminal Agent Built with Bash and jq

A developer has built Termai, a terminal-based AI assistant using only Bash and jq, without relying on Python or Node.js. The tool connects to a large language model and supports capabilities such as web search, weather checks, URL fetching, and command execution. Tool-calling functionality was implemented using a simple case statement, where the model selects a tool, Bash executes it, and the result is returned to the model. The project demonstrates that a functional AI agent can be constructed with minimal dependencies using standard shell scripting tools.

0
ProgrammingDEV Community ·

SignalWatch Delivers Text Diffs via Email and Webhooks Without Screenshots

A developer built SignalWatch, a hosted web-monitoring tool that detects changes on public URLs and delivers unified text diffs rather than screenshots. The service polls pages every 15 minutes on the free plan, scopes changes using CSS selectors, and filters noise through ignore-regex and minimum change-ratio settings. Alerts can be sent via email, Slack, Discord, or HMAC-signed JSON webhooks compatible with automation tools like n8n. Unlike self-hosted alternatives such as changedetection.io, SignalWatch is a fully managed solution requiring no container setup, though it does not support JavaScript rendering or login-gated pages. The free tier allows up to three monitors with no credit card required, and a live public demo tracks the Hacker News front page.