mirror of
https://github.com/tenrok/axios.git
synced 2026-05-15 11:59:42 +03:00
fix: add missing type for allowAbsoluteUrls (#6818)
* fix: add missing type for allowAbsoluteUrls * fix: use semicolon in type files --------- Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
@@ -376,6 +376,7 @@ declare namespace axios {
|
||||
url?: string;
|
||||
method?: Method | string;
|
||||
baseURL?: string;
|
||||
allowAbsoluteUrls?: boolean;
|
||||
transformRequest?: AxiosRequestTransformer | AxiosRequestTransformer[];
|
||||
transformResponse?: AxiosResponseTransformer | AxiosResponseTransformer[];
|
||||
headers?: (RawAxiosRequestHeaders & MethodsHeaders) | AxiosHeaders;
|
||||
|
||||
Vendored
+1
@@ -317,6 +317,7 @@ export interface AxiosRequestConfig<D = any> {
|
||||
url?: string;
|
||||
method?: Method | string;
|
||||
baseURL?: string;
|
||||
allowAbsoluteUrls?: boolean;
|
||||
transformRequest?: AxiosRequestTransformer | AxiosRequestTransformer[];
|
||||
transformResponse?: AxiosResponseTransformer | AxiosResponseTransformer[];
|
||||
headers?: (RawAxiosRequestHeaders & MethodsHeaders) | AxiosHeaders;
|
||||
|
||||
@@ -3,6 +3,7 @@ import axios = require('axios');
|
||||
const config: axios.AxiosRequestConfig = {
|
||||
url: '/user',
|
||||
method: 'get',
|
||||
allowAbsoluteUrls: false,
|
||||
baseURL: 'https://api.example.com/',
|
||||
transformRequest: (data: any) => '{"foo":"bar"}',
|
||||
transformResponse: [
|
||||
|
||||
@@ -27,6 +27,7 @@ const config: AxiosRequestConfig = {
|
||||
url: '/user',
|
||||
method: 'get',
|
||||
baseURL: 'https://api.example.com/',
|
||||
allowAbsoluteUrls: false,
|
||||
transformRequest: (data: any) => '{"foo":"bar"}',
|
||||
transformResponse: [
|
||||
(data: any) => ({ baz: 'qux' })
|
||||
|
||||
Reference in New Issue
Block a user