 # 2 ways to call it
 # url, params, callback or
 # url, callback
-# 
+#
 http_get  = (args...) ->
   [url,params,callback] = args
   [params,callback] = [null,params] unless callback
-  options = 
+  options =
     method : 'GET'
     url    : url
   http_request( options , params , callback)

      query = querystring.stringify params
      append = if aurl.query then '&' else '?'
      options.path += append + query
      
    options.headers['Cookie'] = all_cookies
    options.headers['Referer'] = 'http://d.web2.qq.com/proxy.html?v=20110331002&callback=1&id=3'


        req.write(data);
    req.end();

handle_resp_body = (body , options , callback) ->
    err = null
    try
        ret = JSON.parse body
    catch error
        console.log "解析出错", options.url, body
        console.log error
        err = error
        ret = null
