Socket
Socket
Sign inDemoInstall

xior

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xior - npm Package Versions

1235

0.2.2

Diff

Changelog

Source

v0.2.2

  • fix(plugin): fix error-retry plugin, TypeError should retry too
  • feat(plugin): error-retry plugin, retryInterval can be function too, and add onRetry to options
  • chore(core): minor improvment
suhaotian
published 0.2.1 •

Changelog

Source

v0.2.1 2024/03/17

  • 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' } });
suhaotian
published 0.1.4 •

Changelog

Source

v0.1.4 2024-03-09

  • Feat(core): support xiorInstance.defaults.headers['Authorization'] = 'Basic token';
suhaotian
published 0.1.3 •

Changelog

Source

v0.1.3 2024-03-08

  • Feat(core): add isGet?: boolean option
suhaotian
published 0.1.2 •

Changelog

Source

v0.1.2

  • Feat(cache plugin): add fromCache: boolean in cache plugin
suhaotian
published 0.1.1 •

Changelog

Source

v0.1.1 2024-03-04

  • Fix: compatiable delete method with axios, and delete method shouldn't have body
  • Chore: remove unused code in core module

Breaking change:

import xior from 'xior';

const http = xior.create({ baseURL: 'https://exampled.com' });

// before
http.delete('/', {}, { params: { a: 1, b: 2 } });

// now
http.delete('/', { params: { a: 1, b: 2 } });
suhaotian
published 0.0.10 •

Changelog

Source

v0.0.10 2024-03-01

  • chore(build): Update build config to ensure consistency of plugin import paths
  • chore(doc): Update README
suhaotian
published 0.0.9 •

Changelog

Source

v0.0.9 2024-02-29

  • fix(plugins): resolve import plugins not found file error in expo(react-native) project
suhaotian
published 0.0.8 •

Changelog

Source

v0.0.8 2024-02-29

  • feat(core): compatiable axios's options: paramsSerializer and withCredentials
suhaotian
published 0.0.7 •

Changelog

Source

v0.0.7 2024-02-27

  • feat(core): suport nested object paramaters in default
  • feat(plugin): implemented error retry, cache, throttle, and upload/download progress plugins
  • fix(build): resolved Bunchee build output error with Vite projects.
  • chore(doc): updated README.md
  • chore(examples): add bun, vite, and next build example for make sure it's working in these projects
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc