
Security News
US Government Forces Anthropic to Pull Claude Fable Days After Launch
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.
ng-restclient
Advanced tools
針對Angular5+並基於修飾器的REST API Client建構器
npm install ng-restclient
import {
ApiBase,
ApiMethod,
ApiParameter,
ApiParameterTypes
} from 'ng-restclient';
import { Observable } from 'rxjs/Observable';
import { RequestMethod } from '@angular/http';
@ApiBase('https://jsonplaceholder.typicode.com')
export class FakeAPI {
@ApiMethod({ url: '/posts/{postId}' })
public getPost(
@ApiParameter({ type: ApiParameterTypes.Route })
postId: number,
@ApiParameter() value: number
): Observable<JSON> {
return null;
}
@ApiMethod({ url: '/posts', method: RequestMethod.Post })
public postPost(): Observable<JSON> {
return null;
}
@ApiMethod({ url: '/posts/{postId}', method: RequestMethod.Put })
public putPost(
@ApiParameter({ type: ApiParameterTypes.Route })
postId: number
): Observable<JSON> {
return null;
}
@ApiMethod({
url: '/posts/{postId}',
method: RequestMethod.Delete
})
public deletePost(
@ApiParameter({ type: ApiParameterTypes.Route })
postId: number
): Observable<JSON> {
return null;
}
}
import { NgModule } from '@angular/core';
import { NgRestClientModule } from 'ng-restclient';
// something import
@NgModule({
declarations: [
AppComponent
],
imports: [
NgRestClientModule
// something import
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
import { Component } from '@angular/core';
import { RestClientBuilder } from 'ng-restclient';
import { FakeAPI } from './fakeAPI';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'app';
constructor(private builder: RestClientBuilder) {
const client: FakeAPI = builder.build(FakeAPI);
client.getPost(1, null).subscribe(console.log);
}
}
FAQs
針對Angular5+提供使用修飾器定義產生的REST Client
The npm package ng-restclient receives a total of 3 weekly downloads. As such, ng-restclient popularity was classified as not popular.
We found that ng-restclient 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
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.

Security News
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.