Skip to content

DenoteMD/denote-request

Repository files navigation

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

About

Build on top of axios and denote-ui

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published