Question

I'm working on a browser-like javascript environment in Java. A key requirement is to have an XMLHttpClient object available. In particular, I want to work with Server-side Events and OAuth for testing.

So how does this XMLHttpRequest object get into Rhino?

I was looking at some Java implementations of XMLHttpClient (e.g., XMLHttpRequest in Rhino?), but none is working flawlessly.

Another idea was to use the Apache HttpClient library. Is this similar to what the spec for the XMLHttpRequest object requires? What is the the gap between those two? Or is there another, simpler solution that would be better?

Thanks a lot for suggestions and feedback!

Was it helpful?

Solution

I would suggest starting with the HtmlUnit implementation, which you can find at SourceForge. HtmlUnit would give you a gigantic head start on what you're trying to do, or might act as a replacement for what you're trying to do, depending on your more detailed needs.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top