I'm developing a desktop application that communicates with a server through an http api.
I've realized that I made a mistake in the beginning of the development process and now I have to revamp the whole communication code in those applications (when to send what and what to reply, etc..).
Is there a methodology where I can visually (like a mindmap) plan all the communications between two piece of software?
One convenient way of visualizing communication protocols is using UML. Specifically, sequence diagrams similar to this:
This site has quite a few sequence diagrams of common communication protocols.
Other, often useful, diagrams are communication diagrams:
and state diagrams:
There are a variety of UML modeling tools for creating such diagrams.