4.1.1 • Published 6 years ago
@mbamobi/http v4.1.1
HttpModule
This allow define urls Http using url-resolver to make request Http and intercept with plugins/events to analisy responses
Using HttpModule in an Ionic 2 app
import { NgModule } from '@angular/core';
import { IonicApp, IonicModule } from 'ionic-angular';
import { MyApp } from './app.component';
// import configuration module
import { ConfigurationModule } from '@mbamobi/configuration';
// import url-resolver module
import { UrlResolverModule } from '@mbamobi/url-resolver';
// Import http module
import { HttpModule, DefaultPlugins } from '@mbamobi/http';
export const APP_CONFIG = {
'urlResolver': {
'dev': {
'_defaults': {
'host': 'http://api.example.com/'
},
'user': {
'url': 'user/{id}',
'method': 'GET',
'headers': {
'content-type': 'application/json'
},
'params': {
'id': {
'type': 'number',
'required': true
}
}
}
}
}
};
@NgModule({
declarations: [
MyApp
],
imports: [
IonicModule.forRoot(MyApp),
ConfigurationModule.initialize(APP_CONFIG, 'dev')
UrlResolverModule.initialize(),
HttpModule.initialize(DefaultPlugins) // http module with plugin parseResponse
],
bootstrap: [IonicApp],
entryComponents: [
MyApp
]
})
export class AppModule {}
Contributing
See CONTRIBUTING.md
4.1.1
6 years ago
4.1.0
6 years ago
4.0.0-nightly.20180120T141018Z.c50659a
6 years ago
4.0.0
6 years ago
2.2.1-nightly.20171009T011022Z.5f0e096
7 years ago
2.2.1-nightly.20170918T195608Z.b8d1a60
7 years ago
2.2.1
7 years ago
3.0.0
7 years ago
2.2.0
7 years ago
2.1.0
7 years ago
2.0.0
7 years ago
1.1.0
7 years ago
1.0.1-nightly.20170317T193826Z.d0306c7
7 years ago
1.0.1-nightly.20170309T181924Z.7938104
7 years ago
1.0.1-nightly.20170308T210856Z.27b2e4c
7 years ago
1.0.1-nightly.20170306T135011Z.373921d
7 years ago
1.0.1-nightly.20170215T131211Z.7c184e6
7 years ago
1.0.1-nightly.20170212T002951Z.1949817
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago
0.0.34-nightly.20170114T164926Z.638ee1b
7 years ago