1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import Axios, { AxiosInstance } from "axios";
7 export const API_HOST = 'https://qr1hi.arvadosapi.com';
9 export const serverApi: AxiosInstance = Axios.create({
10 baseURL: API_HOST + '/arvados/v1'
13 export function setServerApiAuthorizationHeader(token: string) {
14 serverApi.defaults.headers.common = {
15 'Authorization': `OAuth2 ${token}`
18 export function removeServerApiAuthorizationHeader() {
19 delete serverApi.defaults.headers.common.Authorization;