mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 23:00:30 +00:00
12 lines
269 B
JavaScript
12 lines
269 B
JavaScript
// @flow
|
|
import type { RequestHeader } from '../../models/request';
|
|
|
|
export function getBearerAuthHeader(
|
|
token: string,
|
|
prefix: string
|
|
): RequestHeader {
|
|
const name = 'Authorization';
|
|
const value = `${prefix || 'Bearer'} ${token}`;
|
|
return { name, value };
|
|
}
|