👷🏻 Auto-generate frontend client (#1320)
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import axios from "axios"
|
||||
import type {
|
||||
AxiosError,
|
||||
AxiosInstance,
|
||||
AxiosRequestConfig,
|
||||
AxiosResponse,
|
||||
AxiosInstance,
|
||||
} from "axios"
|
||||
|
||||
import { ApiError } from "./ApiError"
|
||||
@@ -151,12 +151,12 @@ export const getHeaders = async (
|
||||
)
|
||||
|
||||
if (isStringWithValue(token)) {
|
||||
headers.Authorization = `Bearer ${token}`
|
||||
headers["Authorization"] = `Bearer ${token}`
|
||||
}
|
||||
|
||||
if (isStringWithValue(username) && isStringWithValue(password)) {
|
||||
const credentials = base64(`${username}:${password}`)
|
||||
headers.Authorization = `Basic ${credentials}`
|
||||
headers["Authorization"] = `Basic ${credentials}`
|
||||
}
|
||||
|
||||
if (options.body !== undefined) {
|
||||
|
||||
Reference in New Issue
Block a user