HTTP

Installation

npm install @vite/vitejs-http --save
yarn add @vite/vitejs-http

Import

import HTTP_RPC from "@vite/vitejs-http";
const { HTTP_RPC } = require('@vite/vitejs-http');

Constructor

  • Constructor Parameters:

    • url : string Connection url. Default is 'http://localhost:8415'
    • timout : number Timeout(ms) Default is 60000
    • Object
      • headers : object : Request header
  • Example:

import HTTP_RPC from "@vite/vitejs-http";
const httpProvider = new HTTP_RPC("http://localhost:8080");