2012-10-21 70 views

回答

0

這似乎這樣的伎倆:

  var encoder:Base64Encoder = new Base64Encoder(); 
      encoder.insertNewLines = false; 
      encoder.encode(name + ":" + password); 

      loginUsersService.headers = {Authorization:"Basic " + encoder.toString()}; 
      loginUsersService.contentType = "application/json"; 
      //loginUsersService.method = HTTPRequestMessage.POST_METHOD; use GET 
      loginUsersService.request = new URLVariables("name=John+Doe"); 
      loginUsersService.url = hostURL + getUsersAPI; 
      loginUsersService.send(); 

唯一的問題是,我把它發送到具有無關採伐現有的API換句話說,我沒有把它發送到一個明確的登錄API(因爲我找不到或者我認爲它不存在)。