Search code examples
postgwtrequest

POST request in GWT application


There's a form on my local network which I believe is a GWT application (Google Web Toolkit). It's a front-end Java framework, and I want to send a POST request to it using Python's "requests" module.

As you may know, the "requests.post()" method requires a "data" argument, which represents the payload being sent to the page. However, I noticed something strange when looking at the payload type in the Google dev tools. It appears to be a string that looks like this: "some Java code |1| more Java code".

My first question is, why is the payload data in this format?

My second question is, if I replace the value of |1| with the data I want to POST to the server, will there be any issues?

if i replace '|1|' with a value that i want to send it is a problem?


Solution

  • GWT uses a framework called "GWT RPC" for client-server communication.

    https://www.gwtproject.org/doc/latest/tutorial/RPC.html

    It is optimized for exchanging java objects and pretty different from REST requests with JSON or XML and quite hard to do manually, especially when you don't have the backend code at hand.

    See Serializing RPC-GWT for a related question.