Giter VIP home page Giter VIP logo

axios's Introduction

axios's People

Contributors

dependabot[bot] avatar greenkeeper[bot] avatar javierbrea avatar jsmolina avatar methadata avatar renovate-bot avatar renovate[bot] avatar

Watchers

 avatar  avatar  avatar

axios's Issues

Upgrade axios version

Current version of Axios is 0.18.0, which has a security vulnerability.
It is desirable to upgrade Axios to latest version, but there is a known issue (axios/axios#2203) in version 0.19.0, which makes it incompatible with axios-retry (softonic/axios-retry#59)
When these issues are fixed, axios and axios-retry dependencies should be upgraded.

support http body in delete request

Is your feature request related to a problem? Please describe.
Delete supports sending a body, although is not mostly used.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/DELETE

Axios has support for it as well, but data provider seems to only support query params:
https://www.npmjs.com/package/@data-provider/axios#user-content-delete

Describe the solution you'd like
We should add support to send a body with the request, just like create() in request.

PS: I might be wrong and it is already supported, but it is, please close this issue.
Thanks

Url parameters removes trailing slash

Description
When the provider url includes parameters and has a trailing slash, it is removed.

Example
In the next example, the resolved request url is /api/users/5, and it should be /api/users/5/

import { Api } from "@data-provider/axios";

const user = new Api("/api/users/:id/");

user.query({
  urlParams: {
    id: 5
  }
}).read();

Expected behavior
Request should maintain the trailing slash.

Use baseTag getter to add base tags

The core now supports defining base tags for addons. It is desirable to use this feature to add the base tag instead of adding it to the tags option.

Dependency Dashboard

This issue provides visibility into Renovate updates and their statuses. Learn more

This repository currently has no open or pending branches.

Detected dependencies

None detected


  • Check this box to trigger a request for Renovate to run again on this repository

Array format in query string parameters

Currently, when passing an array to a query string parameter it is always stringified as a list separated by commas.

It is desirable that this behavior can be configured to use another array formats, such as in the query-string npm package

For doing this, a new configuration option called queryStringArrayFormat could be added:

import { Api } from "@data-provider/axios";

const myApi =  new Api("/foo-url", {
  queryStringArrayFormat: "none"
});

fooApi.query({
  queryString: { foo: [1, 2, 3] }
}).read();

//=> 'foo=1,2'

Available formats could be the same than in the query-string npm package:

  • 'bracket': Serialize arrays using bracket representation:
//=> 'foo[]=1&foo[]=2&foo[]=3'
  • 'index': Serialize arrays using index representation:
//=> 'foo[0]=1&foo[1]=2&foo[3]=3'
  • 'comma': Serialize arrays by separating elements with comma (default behavior until next major version for maintaining retrocompatibility):
//=> 'foo=1,2,3'
  • 'none': Serialize arrays by using duplicate keys (default behavior in next major version):
//=> 'foo=1&foo=2&foo=3'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.