@turtlepay/httpclient
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

TurtlePay® HTTPClient Helper Library

Prerequisite Documentation Maintenance License: MIT Twitter: TurtlePay

NPM

Master Build Status

Build Status

Development Build Status

Build Status

Overview

Provides an easy to use HTTP/s Client interface that is meant to be extended from

Prerequisites

  • node >= 12

Documentation

Full library documentation is available at https://httpclient.turtlepay.dev

Install

Using Yarn

yarn add @turtlepay/httpclient

Using NPM

npm install @turtlepay/httpclient

Usage

import { HTTPClient } from '@turtlepay/httpclient';

class APIInterface extends HTTPClient {
    public async info (): Promise<{major_version: number}> {
        return this.get<{major_version: number}>('info');
    }
}

(async() => {
    const client = new APIInterface('blockapi.turtlepay.io', 443, true);
    
    console.log(await client.info());
})

Run tests

yarn test

Author

👤 TurtlePay® Development Team

🤝 Contributing

Contributions, issues and feature requests are welcome!

Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2020 TurtlePay® Development Team.

This project is MIT licensed.

Package Sidebar

Install

npm i @turtlepay/httpclient

Weekly Downloads

4

Version

0.1.0

License

MIT

Unpacked Size

18.8 kB

Total Files

5

Last publish

Collaborators

  • brandonlehmann