       options.headers ||= {}
       options.headers['Authorization'] ||= "token #{token}"
 
-    options.url = "#{endpoint}#{url}"
+    url = "#{endpoint}#{url}"
     options.type = method
     options.dataType = options.dataType || 'json'
     options.context = this

    @ajax(url, 'post', data: data, success: callback)

  needsAuth: (method, url) ->
    return true if method != 'GET'

    result = @publicEndpoints.find (pattern) ->


  ajax: (url, method, options) ->
    method = method.toUpperCase()

    endpoint = Travis.config.api_endpoint || ''
    options = options || {}

