Skip to content

Commit

Permalink
different reqs?
Browse files Browse the repository at this point in the history
  • Loading branch information
w-vi committed Nov 27, 2015
1 parent 7ab8829 commit 7f7946a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/reporters/apiary-reporter.coffee
Expand Up @@ -266,16 +266,15 @@ class ApiaryReporter

if @configuration.apiUrl?.indexOf('https') is 0
console.log 'https'
req = https.request options, handleResponse
reqs = https.request options, handleResponse
reqs.on 'error', handleReqError
reqs.write postData
reqs.end()
else
console.log 'http'
req = http.request options, handleResponse

try
req.on 'error', handleReqError
req.write postData
req.end()
catch e
handleReqError e

module.exports = ApiaryReporter

0 comments on commit 7f7946a

Please sign in to comment.