@page-libs/ajax

1.1.8 • Public • Published

page-ajax

NPM Version Build Status codecov

Ajax plugin for Page framework. It's based on the Async Tree Pattern.

Install

npm install @page-libs/ajax

Run test

npm test

Run build

npm run build

Package is already built. So, for using in Page you just need to install it.

Examples

new ResponseFromAjaxRequest({
  url: 'http://localhost:8000/',
  method: 'GET' 
}).call();

Usage

const {
  // Here needed async objects from the table below
} = require('@page-libs/ajax');
Async Object Async/sync call Parameters(default value/description) Representation result
ResponseBody response.body, response = {statusCode, headers, body} response({statusCode, headers, body}) body
ResponseFromAjaxRequest responseFromAjaxRequest options[, requestBody] (options = {url, method, headers, mimeType, withCredentials, user, password, timeout, progressEvent, uploadProgressEvent}, requestBody) response({statusCode, headers, body})
ResponseHeaders response.headers, response = {statusCode, headers, body} response({statusCode, headers, body}) object
ResponseStatusCode response.statusCode, response = {statusCode, headers, body} response({statusCode, headers, body}) number

Readme

Keywords

Package Sidebar

Install

npm i @page-libs/ajax

Weekly Downloads

1

Version

1.1.8

License

MIT

Unpacked Size

28.4 kB

Total Files

26

Last publish

Collaborators

  • guseyn