
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
@vts-kit/angular-network
Advanced tools
Collection of useful network utillities to be integrated with Angular project
npm install @vts-kit/angular-network
RestClient provide abilities to interact with RESTful API through builder pattern.
Import
// app.module.ts
import { VtsRestModule, RestClientOptions, VtsRestModuleConfig } from "@vts-kit/angular-network"
// Default config
const NETWORK_MODULE_CONFIG: VtsRestModuleConfig = {
defaultConfig: new RestClientOptions()
.setBaseUrl('https://<base_api_url>')
.setHeader('<key>', '<value>')
.setParam('<key>', '<value>')
.setRetry(3),
};
@NgModule({
declarations: [AppComponent],
imports: [
...,
VtsRestModule.forRoot(NETWORK_MODULE_CONFIG)
// Without default config
// VtsRestModule.forRoot()
]
})
export class AppModule {}
Usage
Pattern:
client
.setHeader("key", "value")
.setTimeout(60000)
... // More builder
.obserseBody() // or obserseEvents() or obserseResponse()
.get("<path or url>") // or post, patch, put, options, delete
.subscribe(...)
Example:
// name.any.ts
@Injectable({
providedIn: 'root',
})
export class Service {
constructor(private client: RestClient) {}
callApi() {
this.client
.obserseBody()
.get<Post[]>('/posts')
.subscribe({
next: (d) => console.log(d[0].title),
error: (e) => console.log(e),
});
}
}
Provide some useful function to interact with network state, data...
| No | Function Name | Description | Output |
|---|---|---|---|
| 1 | online$ | Return observable to network status | Observable |
| 2 | isOnline | Return current network active status | boolean |
FAQs
Collection of useful network utillities to be integrated with Angular project
The npm package @vts-kit/angular-network receives a total of 29 weekly downloads. As such, @vts-kit/angular-network popularity was classified as not popular.
We found that @vts-kit/angular-network demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.