npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ng-http-spring

v1.0.0-beta.0

Published

A Spring Boot-like HTTP library for Angular with decorators, caching, request queuing, file upload, WebSocket, and GraphQL support

Readme

NgHttpSpring

A Spring Boot-like HTTP library for Angular with decorators, caching, request queuing, file upload, WebSocket, and GraphQL support.

Features

  • Spring-like HTTP decorators (@Get, @Post, @Put, @Delete)
  • Parameter decorators (@PathVariable, @RequestParam, @RequestBody)
  • Built-in caching support with configurable cache strategies
  • Request queueing for offline mode and retry support
  • File upload utilities with progress tracking
  • WebSocket support with decorator-based configuration
  • GraphQL client integration
  • Interceptor support for authentication, error handling, and logging
  • TypeScript-first development with full type safety

Installation

npm install ng-http-spring

Quick Start

  1. Import the module:
import { NgHttpSpringModule } from 'ng-http-spring';

@NgModule({
  imports: [
    NgHttpSpringModule
  ]
})
export class AppModule { }
  1. Use the decorators in your service:
@Injectable()
export class UserService {
  @Get('/users/{id}')
  getUser(@PathVariable('id') id: string): Observable<User> {
    return; // Method implementation is handled by the decorator
  }

  @Post('/users')
  createUser(@RequestBody() user: User): Observable<User> {
    return;
  }
}

Advanced Features

Caching

@Get('/users', { cache: { expiryMs: 60000 } }) // Cache for 1 minute
getUsers(): Observable<User[]> {
  return;
}

Request Queuing

@Post('/users', { queue: true }) // Queue requests when offline
createUser(@RequestBody() user: User): Observable<User> {
  return;
}

File Upload

@Post('/upload')
uploadFile(@RequestBody() file: File): Observable<UploadResult> {
  return;
}

WebSocket

@WebSocket('/ws')
connect(): Observable<WebSocketMessage> {
  return;
}

GraphQL

@Query(`
  query GetUser($id: ID!) {
    user(id: $id) {
      name
      email
    }
  }
`)
getUser(@Variable('id') id: string): Observable<User> {
  return;
}

Documentation

For detailed documentation, please visit:

Contributing

We welcome contributions! Please read our contributing guidelines to get started.

License

This project is licensed under the MIT License - see the LICENSE file for details.

To build the library, run:

ng build ng-http-spring

This command will compile your project, and the build artifacts will be placed in the dist/ directory.

Publishing the Library

Once the project is built, you can publish your library by following these steps:

  1. Navigate to the dist directory:

    cd dist/ng-http-spring
  2. Run the npm publish command to publish your library to the npm registry:

    npm publish

Running unit tests

To execute unit tests with the Karma test runner, use the following command:

ng test

Running end-to-end tests

For end-to-end (e2e) testing, run:

ng e2e

Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.

Additional Resources

For more information on using the Angular CLI, including detailed command references, visit the Angular CLI Overview and Command Reference page.