mirror of
https://github.com/tenrok/axios.git
synced 2026-05-15 11:59:42 +03:00
fix: removing multiple/trailing/leading whitespaces (#5022)
* fix: removing multiple/trailing/leading whitespaces * Reverting changes in the dist directory Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<p align="center">
|
||||
<a href="https://axios-http.com/"><b>Website</b></a> •
|
||||
<a href="https://axios-http.com/docs/intro"><b>Documentation</b></a>
|
||||
</p>
|
||||
</p>
|
||||
|
||||
<div align="center">
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [Features](#features)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</head>
|
||||
<body class="container">
|
||||
<h1>AMD</h1>
|
||||
|
||||
|
||||
<div>
|
||||
<h3>User</h3>
|
||||
<div class="row">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export default function (req, res) {
|
||||
let data = '';
|
||||
|
||||
|
||||
req.on('data', function (chunk) {
|
||||
data += chunk;
|
||||
});
|
||||
|
||||
Vendored
+2
-2
@@ -6,7 +6,7 @@ type MethodsHeaders = {
|
||||
[Key in Method as Lowercase<Key>]: AxiosHeaders;
|
||||
};
|
||||
|
||||
interface CommonHeaders {
|
||||
interface CommonHeaders {
|
||||
common: AxiosHeaders;
|
||||
}
|
||||
|
||||
@@ -345,7 +345,7 @@ export interface CreateAxiosDefaults<D = any> extends Omit<AxiosRequestConfig<D>
|
||||
headers?: RawAxiosRequestHeaders | Partial<HeadersDefaults>;
|
||||
}
|
||||
|
||||
export interface AxiosResponse<T = any, D = any> {
|
||||
export interface AxiosResponse<T = any, D = any> {
|
||||
data: T;
|
||||
status: number;
|
||||
statusText: string;
|
||||
|
||||
+1
-1
@@ -89,7 +89,7 @@ export default isXHRAdapterSupported && function (config) {
|
||||
const responseHeaders = AxiosHeaders.from(
|
||||
'getAllResponseHeaders' in request && request.getAllResponseHeaders()
|
||||
);
|
||||
const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
|
||||
const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
|
||||
request.responseText : request.response;
|
||||
const response = {
|
||||
data: responseData,
|
||||
|
||||
@@ -48,7 +48,7 @@ function speedometer(samplesCount, min) {
|
||||
|
||||
const passed = startedAt && now - startedAt;
|
||||
|
||||
return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
|
||||
return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ describe('core::AxiosError', function() {
|
||||
const request = { path: '/foo' };
|
||||
const response = { status: 200, data: { foo: 'bar' } };
|
||||
|
||||
const axiosError = AxiosError.from(error, 'ESOMETHING', { foo: 'bar' }, request, response);
|
||||
const axiosError = AxiosError.from(error, 'ESOMETHING', { foo: 'bar' }, request, response);
|
||||
expect(axiosError.config).toEqual({ foo: 'bar' });
|
||||
expect(axiosError.code).toBe('ESOMETHING');
|
||||
expect(axiosError.request).toBe(request);
|
||||
|
||||
Reference in New Issue
Block a user