Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Add authorization header config option #740

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/utils/send-request.js
Expand Up @@ -108,6 +108,10 @@ function requestAPI (config, options, callback) {
const method = 'POST'
const headers = {}

if (config.authorization) {
headers['Authorization'] = config.authorization
}

if (isNode) {
// Browsers do not allow you to modify the user agent
headers['User-Agent'] = config['user-agent']
Expand Down