Wondering what’s next for npm?Check out our public roadmap! »

denote-request
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

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

Install

npm i denote-request

DownloadsWeekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

5.78 kB

Total Files

6

Last publish

Collaborators

  • avatar