 xml2js = require 'xml2js'
 fogbugzURL = null
 
-SetURL = (url) -> fogbugzURL = "http://" + url + "/api.asp?"
+SetURL = (url) -> fogbugzURL = "https://" + url + "/api.asp?"
 
 #User Authentication
 LogOn = (username, password, callback) ->

		if err then callback(new Error('Error searching cases')) else callback(null, result['cases'][0]['case'])
	)



# Calls the Fogbugz XML Api and returns the result as JSON
# TODO: Better parsing of URL (eg use sax to parse it while it comes through)

 	)


# ---------------- Cases -----------------------

SearchCases = (options, token, callback) ->
	command = 'cmd=search'
	if(options['q']) then command += "&q=#{options['q']}"
