This package has been deprecated

Author message:

The library has been moved to @ngx-resource/handler-ngx-http-legacy and all Rest renamed to Resource

rest-ngx-http
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

rest-ngx-http

It's implementation of RestHandler which uses Angular Http from @angular/http

How to install and setup it

& npm i --save rest-core rest-ngx-http

In you app module

// AoT requires an exported function for factories
export function myHandlerFactory(http: Http) {
    return new MyRestHandler(http);
}

@NgModule({
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    HttpClientModule,

    // Default RestHandler uses class `RestHandlerHttp`
    RestModule.forRoot()
    
    // Or set you own handler
    //RestModule.forRoot({
    //  handler: { provide: RestHandler, useFactory: (myHandlerFactory), deps: [Http] }
    //})
  ],
  declarations: [...],
  bootstrap: [...],
  entryComponents: [...],
  providers: [...]
})
export class AppModule {
}

Package Sidebar

Install

npm i rest-ngx-http

Weekly Downloads

0

Version

0.1.0

License

MIT

Last publish

Collaborators

  • troyanskiy