# AS3: Basic Auth returns HTTP Status #0 (?)

**URL:** <https://forum.kirupa.com/t/as3-basic-auth-returns-http-status-0/303087>\
**Category:** flash\
**Created:** [January 13, 2010, 6:58pm UTC](https://forum.kirupa.com/t/as3-basic-auth-returns-http-status-0/303087 "2010-01-13T18:58:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thinker2501](https://avatars.discourse-cdn.com/v4/letter/t/e0b2c6/32.png) [@Thinker2501](https://forum.kirupa.com/u/Thinker2501)\
**Post date:** [January 13, 2010, 6:58pm UTC](https://forum.kirupa.com/t/as3-basic-auth-returns-http-status-0/303087/1 "2010-01-13T18:58:04Z")

</div>

Im working on a Flash script to connect to twitter via a PHP proxy I’ve written. When I go to the proxy in a browser, the browser spawns the standard username/password dialogue and then the proxy works just fine.

However, when I send the user name and password from an SWF after it has been base64 encoded, and set as a header user URLRequestHeader(“HTTP\_AUTHENTICATION”, "BASIC " + [encoded credentials]);

I get a HTTP Status code of 0. Which is not a real code. I also have a cross-domain file on the server set to accept all headers.

Does anyone have experience with Basic Auth from Flash that could give me some pointers?
