1.0.2 • Published 5 years ago

denote-request v1.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

Denote Request

Instruction

A request wrapper build on top of denote-ui and axios

Installation

npm i denote-request

Example

import { DenoteUserIdentity } from 'denote-ui';
import { DenoteRequest } from 'denote-request';

(async () => {
  const user = DenoteUserIdentity.fromMnemonic(
    'jump dirt foam license journey imitate forum orient hard miracle task castle',
  );

  const dr = DenoteRequest.init(user);

  const res = await dr.request({
    method: 'POST',
    url: 'http://localhost:1337/v1/echo',
    data: {
      msg: 'Hello',
      sender: 'Chiro',
    },
  });

  console.log(res.data);
})();

License

This software was licensed under MIT License