I am using Retrofit to make api calls in my android application. I have to submit a @Body of JSON
@GET(\"api/\")
void getData(@Body UserPostRequestBody request)
The definition of GET as explained here in this answer explains that a body isn't supposed to mean anything, so Retrofit doesn't allow you to add a body. That said, it is not true that a server HAS to follow this format. It's entirely possible for a server to have a GET endpoint that not only takes, but REQUIRES a body. It would be "bad" architecture, but it seems a bit silly for Retrofit to limit what the library can do unnecessarily.
Furthermore, the various HTTP methods have different definitions for what they are SUPPOSED to do. For example a GET gets information, a POST creates a new entry/object by providing information to the server, a PUT updates an existing entry/object etc. The problem is, the easiest way to pass complex data to the server, especially when using retrofit, is by using JSON. So the ideal way to GET information from the server while providing a complex filter would be to send a JSON body along with the GET request. Unfortunately, there is no HTTP request method that allows for this under the spec.