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

easy-http2-angular

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

easy-http2-angular

## -------------------------------------------------------------------------- ## Authers: Abdulwahab Herbli - Tasnim Kasab ## --------------------------------------------------------------------------

  • 1.0.6
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Easy-Http2-Angular (Angular)

--------------------------------------------------------------------------

Authers: Abdulwahab Herbli - Tasnim Kasab

--------------------------------------------------------------------------

Github:

Follow our Repo from here

Installation:

npm i easy-http2-angular@latest

Basic Usage:

Import EasyHttpService in your Service as following:
import { EasyHttpService } from  'easy-http2-angular';
Here is an example for basic usage:
async getProducts() {

return await this.httpHelper.get(baseUrl, headers,params);
}

Advance Usage:

Import EasyHttpService in your Service as following:
import { EasyHttpService } from  'easy-http2-angular';
All the http request functions are genaric type < T > example usage:
async  getProducts():  Promise<IProducts[] |  String> {
	const  product:  HttpResponseType<IProducts[]> =
	await  this.httpHelper.get<Promise<IProducts[]> | String>(baseUrl,headers, params);
	if (product.status) {
		return  product.data;
	  }
	return  product.msg
}
In this case, HttpResponseType is:
export  interface  HttpResponseType<T> {
	status?:  Boolean;
	data?:  T;
	msg?:  String
}

Keywords

FAQs

Package last updated on 12 Mar 2023

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