@shadom/portal-plugin-http
v1.0.3
Published
http request protocol
Downloads
7
Readme
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