Unfortunately, Flash Player doesn't support using request headers with GET
requests, as noted here, due to what Adobe terms "browser limitations":
Due to browser limitations, custom HTTP reque开发者_运维百科st headers are only supported for
POST
requests, not forGET
requests.
Hooray. That means I need to create my own HTTP socket class from scratch and find a way to run a policy server on the machine I'll be querying. Hooray.
If I want to make a simple GET HTTP request with HTTP-Basic auth headers, what do I need? I'd need something like
socket.write("HTTP GET REQUEST PAYLOAD HERE");
socket.flush();
What do I put in the write method to compose a GET request?
It's much more worth it to simply write a PHP or Python proxy to do it for you. See file_get_contents: Connection refused.
精彩评论