data-provider / axios Goto Github PK
View Code? Open in Web Editor NEWREST API @data-provider origin addon using Axios
Home Page: https://www.data-provider.org
REST API @data-provider origin addon using Axios
Home Page: https://www.data-provider.org
When the core issue data-provider/core#149 is done, this plugin should use the new force
option when calling to the cleanCache
method, as the data cache should be cleaned immediately after modifying, updating or deleting the data.
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.
This issue provides visibility into Renovate updates and their statuses. Learn more
This repository currently has no open or pending branches.
None detected
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
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.
Travis CI is no longer free: https://blog.travis-ci.com/2020-11-02-travis-ci-new-billing, so builds has to be migrated to a new CI, for instance GitHub Actions.
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:
//=> 'foo[]=1&foo[]=2&foo[]=3'
//=> 'foo[0]=1&foo[1]=2&foo[3]=3'
//=> 'foo=1,2,3'
//=> 'foo=1&foo=2&foo=3'
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.