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

@idan-loo/request-json

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@idan-loo/request-json

A http request library for Restful API. All the responses will be parsed as json objects.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Request JSON

Intro

A http request library for Restful API. All the responses will be parsed as json objects.

Install

npm install --save @idan-loo/request-json

Example

import request from '@idan-loo/request-json';

request.get('./test.json', {name: 'tom'})
    .then(result => /* do something with result */);

Notice

You should give a fetch function in most case.

import request from '@idan-loo/request-json';
import fetch from 'isomorphic-fetch';

request.setFetch(fetch);

request.get(/* do something */);

API

get(uri: string, query?: Object): Promise<any>;
post(uri: string, body: any): Promise<any>;
put(uri: string, body: any): Promise<any>;
delete(uri: string, query?: any): Promise<any>;

Keywords

FAQs

Package last updated on 05 Aug 2017

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