Discussion:
[dwr-users] How to call DWR API from non-JavaScript clients?
resrever
2011-11-09 09:58:52 UTC
Permalink
Hello,

there is a website using DWR. I would like to acces its API from my Java desktop application. Calling the API HTTP POST requests works fine, but the response is JavaScript code. Is there a parameter or something I could pass into my request so I get a response in a different format? Like JSON or XML? Or is parsing the JavaScript response the only way to go?

Thank you!
David Marginian
2011-11-09 12:08:19 UTC
Permalink
Depending on what version of dwr you are using and if you have control
over the server you can get JSON back. Here is a bit more info:
http://directwebremoting.org/dwr/introduction/remoting_options.html
Post by resrever
Hello,
there is a website using DWR. I would like to acces its API from my Java desktop application. Calling the API HTTP POST requests works fine, but the response is JavaScript code. Is there a parameter or something I could pass into my request so I get a response in a different format? Like JSON or XML? Or is parsing the JavaScript response the only way to go?
Thank you!
Loading...