-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTPRequest returns a result with OPTIONS but not POST #466
Comments
... the result data happens to be XML, if that's interesting. |
I will take a quick look at this shortly. I am using HttpService also |
I should mention too that this is meant for Javascript, and not SWF. |
[Edited to get XML formatting to appear in the comment] service.resultFormat = HTTPService.RESULT_FORMAT_OBJECT; you can print the result in the result handler with instead of resultEvent.result I switched it to: and that makes the attempt to create the result as XML
because the XML seems to be missing a root tag:
There might still be bugs or things to improve, but I think it's working for the most part. |
Extra info: I think the relevant parts of this are not yet implemented, which may be the cause: I can look into this more when I have time, unless someone else gets there first. |
I added a fix that works for the example provided. Please check the implementation with examples of more complex content if you can and update this issue, preferably with an example of an XML string that does not decode correctly if you see anything that continues to fail. If everything is as it should be, feel free to close the issue. |
When I make an HTTP request to my server, which handles CORS, the browser first sends an OPTIONS request, and after that sends my request. A sample program is attached.
But my program receives ResultEvent.RESULT after the OPTIONS, instead of after the POST.
I can see this in the Chrome Dev Tools. I can also see that the POST succeeds and produces expected data.
HTTPTest.zip
The text was updated successfully, but these errors were encountered: