Skip to content
This repository has been archived by the owner on Jan 26, 2023. It is now read-only.

Remove all environment detection #15

Merged
merged 1 commit into from
Sep 14, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/detect-environment.coffee

This file was deleted.

5 changes: 1 addition & 4 deletions src/make-http-request.coffee
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
request = require 'superagent'
coreUrl = require 'url'
corePath = require 'path'
env = require './detect-environment'

if env is 'node'
request = request.agent()
request = request.agent() if request.agent?

makeHTTPRequest = (method, url, data, headers = {}, modify) ->
originalArguments = Array::slice.call arguments # In case we need to retry
Expand All @@ -25,7 +23,6 @@ makeHTTPRequest = (method, url, data, headers = {}, modify) ->

req = req.set headers
req = req.withCredentials() if req.withCredentials?

req = modify request if modify?

req.end (err, response) ->
Expand Down