HTTP Basic Authentication with HTTPService Objects in Adobe Flex/AIR

前端 未结 8 1425
梦谈多话
梦谈多话 2020-12-04 14:52

I\'m trying to request a HTTP resource that requires basic authorization headers from within an Adobe AIR application. I\'ve tried manually adding the headers to the request

8条回答
  •  独厮守ぢ
    2020-12-04 15:05

    This really has helped me! Thanks! I use Flex Builder 3

    One note: WebService's property headers is read only. So I tried to use httpHeaders. It works!

        var encoder:Base64Encoder = new Base64Encoder();
        encoder.insertNewLines = false;
        encoder.encode("test:test");
    
        sfWS.httpHeaders = {Authorization:"Basic " + encoder.toString()};   
    

提交回复
热议问题