🐛 fix electron-main request service to use proper protocol

This commit is contained in:
João Moreno
2017-03-06 12:50:07 +01:00
parent 87446fb6b7
commit 74487a0cf6

View File

@@ -64,6 +64,7 @@ export function request(options: IRequestOptions): TPromise<IRequestContext> {
const opts: https.RequestOptions = {
hostname: endpoint.hostname,
port: endpoint.port ? parseInt(endpoint.port) : (endpoint.protocol === 'https:' ? 443 : 80),
protocol: endpoint.protocol,
path: endpoint.path,
method: options.type || 'GET',
headers: options.headers,