Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ngx-dhis2-http-client

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-dhis2-http-client

DHIS2 Http Client is angular 6 library that exposes services for fetching, posting, updating and deleting dhis2 resources

  • 1.0.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
6
decreased by-14.29%
Maintainers
1
Weekly downloads
 
Created
Source

DHIS2 Http Client library

DHIS2 Http Client is angular 6 library that exposes services for fetching, posting, updating and deleting dhis2 resources

installation

npm install ngx-dhis2-http-client

Content

ngx-dhis2-http-client exposes two services .i.e NgxHttpClientService and ManifestService

  • NgxHttpClientService: This service exposes all REST-API methods .i.e. GET, POST, PUT, DELETE

    • GET: get(url: string, preferPreviousApiVersion: boolean = false, useRootUrl: boolean = false)

    • POST: post(url: string, data: any, preferPreviousApiVersion: boolean = false, useRootUrl: boolean = false)

    • PUT: put(url: string, data: any, preferPreviousApiVersion: boolean = false, useRootUrl: boolean = false)

    • DELETE delete(url: string, preferPreviousApiVersion: boolean = false, useRootUrl: boolean = false)

  • ManifestService: This service exposes manifest two methods getManifest and getRootUrl

    • getManifest: This returns payload with the format
     {
       name: string;
       version: number | string;
       description: string;
       launch_path: string;
       icons: {
         16: string;
         48: string;
         128: string;
       };
       developer: {
         name: string;
         url: string;
       };
       default_locale: string;
       activities: {
         dhis: {
           href: string;
         };
       };
     }
    
    • getRootUrl: This method returns rootUrl as specified in the manifest file in activities.dhis.href. This method will return ../../../ if manifest file could not be loaded or href is not specified

Usage

Inject NgxHttpClientService or ManifestService any where in constructor in your angular application eg

 import { NgxDhis2HttpClientService } from 'ngx-dhis2-http-client';
 ...
 constructor(private http: NgxDhis2HttpClientService) {
  }
 ...

NOTE: This library uses HttpClientModule from angular, make sure to import it in your app.module or any module you wish to use this library

FAQs

Package last updated on 05 Jun 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc