Skip to content

Latest commit

 

History

History
38 lines (25 loc) · 812 Bytes

README.md

File metadata and controls

38 lines (25 loc) · 812 Bytes

@edgematrixjs/http

This project used in "axios": "^1.3.4"

Provide postJSON methods for @edgematrixjs/rtc

Dependencies

"axios": "^1.3.4"

INSTALL

npm install --save @edgematrixjs/http

USAGE IN RTC

import { Http } from '@edgematrixjs/http';
import { RTC } from '@edgematrixjs/rtc';
const rtc = new RTC({ debug: false });
const chainId = 2;
const privateKey = '{privatekey}';
const network = 'https://oregon.edgematrix.xyz';
const http = new Http({ baseURL: network });
rtc.createSubject(chainId, privateKey, http);

API

postJSON(options: AxiosRequestConfig) - Similar to Axios

post(options: AxiosRequestConfig) - Similar to Axios

get(options: AxiosRequestConfig) - Similar to Axios