       method: "GET"
       url: @auth.url + "/projects.json"
       params: params
-    config = @setBasicConfig config, @auth
+    config = @_setBasicConfig config, @auth
     @$http(config)
       .success( (data, status, headers, config) =>
         data.url = @auth.url

      method: "POST"
      url: @auth.url + "/issues/#{@_timeEntryData.time_entry.issue_id}/time_entries.json"
      data: Redmine.JSONtoXML @_timeEntryData
    config = @setBasicConfig config, @auth
    config.headers = "Content-Type": "application/xml"
    @$http(config)
      .success((data) =>

  ###
   set basic configs for $http.
  ###
  _setBasicConfig: (config, auth) ->
    config.headers = "Content-Type": Redmine.CONTENT_TYPE
    config.timeout = config.timeout or Redmine.AJAX_TIME_OUT
    if auth.apiKey? and auth.apiKey.length > 0
