@shadom/portal-plugin-http
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

Portal plugin jsonp

A portal makes Ajax requests

Installation

npm install @shadom/portal-plugin-http

Usage

import { HttpPortal } from '@shadom/portal-plugin-http';
import { define, use, transmit } from '@shadom/portal';

define({
    name: 'myPortal',
    type: 'HttpPortal',
    // A portal config
});

transmit('myPortal', {
    // payloads
}).then((res) => {
    // do sth.
});

See Portal defination for detail about defining a portal instance

Package Sidebar

Install

npm i @shadom/portal-plugin-http

Weekly Downloads

0

Version

1.0.3

License

ISC

Unpacked Size

4.9 kB

Total Files

7

Last publish

Collaborators

  • chengxiao