mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 23:00:30 +00:00
5f4c19da35
Co-authored-by: Opender Singh <opender.singh@konghq.com>
12 lines
304 B
TypeScript
12 lines
304 B
TypeScript
import type { RequestHeader } from '../../models/request';
|
|
|
|
export function getBearerAuthHeader(token: string, prefix: string) {
|
|
const name = 'Authorization';
|
|
const value = `${prefix || 'Bearer'} ${token}`;
|
|
const requestHeader: RequestHeader = {
|
|
name,
|
|
value,
|
|
};
|
|
return requestHeader;
|
|
}
|