import { PlatformId } from '../../constants' ; import { resolveBaseUrl } from '../url' ; import { Http , HttpOptions , HttpResponse , InternalHttpOptions } from '.' ; let baseUrl ; export const setBaseUrl = ( url ) : void => { baseUrl = url ; } ; export class BitbucketServerHttp extends Http { constructor ( options ? ) { super ( PlatformId . BitbucketServer , options ) ; } protected override request < T > ( path , options ? ) { const url = resolveBaseUrl ( baseUrl , path ) ; const opts = { baseUrl , ... options , } ; opts . headers = { ... opts . headers , 'X-Atlassian-Token' : 'no-check' , } ; return super . request < T > ( url , opts ) ; } }