npm xior 0.2.1
v0.2.1

latest releases: 0.6.1, 0.6.0, 0.5.5...
8 months ago
  • feat(core): support direct call xior.get/post.. similar to axios.get/post.. API, no need create instance at first
  • fix(core): DELETE and OPTIONS method's data option should be url encoded format like GET / HEAD
  • feat: add UMD(Universal Module Definition) format bundle(now you can directly load xior in browser)
  • feat: add VERSION to xior, now you can get current version of xior by: import xior from 'xior'; console.log(xior.VERSION)
  • feat(new plugin): add error-cache plugin
  • feat(new plugin): add dedupe plugin
  • feat(new plugin): add mock plugin

Breaking Change:

  1. Type

before:

import xior from 'xior';

let instance: xior;
instance = xior.create();

Now:

import xior, { XiorInstance } from 'xior';

let instance: XiorInstance;
instance = xior.create();
  1. OPTIONS method

before:

import xior, { XiorInstance } from 'xior';

const instance = xior.create();
instance.options('/options_api_path', { text: 'this is data' }, { params: { a: 1 } });

now:

import xior, { XiorInstance } from 'xior';

const instance = xior.create();
instance.options('/options_api_path', { params: { a: 1, text: 'this is data' } });

What's Changed

  • More plugins and umd support: support mock, error cache, requests dedupe plugins and UMD output by @suhaotian in #8

Full Changelog: v0.1.4...v0.2.1

Don't miss a new xior release

NewReleases is sending notifications on new releases.