 deleteReq = (url, data, callback)->
   [data, callback] = [callback, null] unless callback
 
-  getNextApiURL (err, apiurl)->
+  getNextApiURL data.proxyUrl, (err, apiurl)->
     return callback err if err
 
     reqOptions =

request        = require 'request'
_ = require "underscore"

getNextApiURL = (callback)->
  return callback null, KONFIG.socialapi.proxyUrl

wrapCallback = (callback)->
  (err, response, body) ->

    request reqOptions, wrapCallback callback

getXml = (url, data, callback)->
  getNextApiURL data.proxyUrl, (err, apiurl)->
    return callback err if err
    reqOptions =
      url    : "#{apiurl}#{url}"
