mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 23:00:30 +00:00
9 lines
263 B
JavaScript
9 lines
263 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 };
|
|
}
|