New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@mbamobi/http

Package Overview
Dependencies
Maintainers
3
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mbamobi/http

Requisição HTTP através de eventos com adição de plugins para interceptação

latest
Source
npmnpm
Version
4.1.1
Version published
Weekly downloads
90
172.73%
Maintainers
3
Weekly downloads
 
Created
Source

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

Keywords

ionic

FAQs

Package last updated on 25 Jan 2018

Did you know?

Socket

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.

Install

Related posts