The common way to do it is to select a JSON protocol that the two sides transfer between each other, For example:
{
fName: "Sean",
lName: "Mellony"
}
And then to make HTTP calls to GET or POST data between your two micro-services.
For example, the server service will have a POST endpoint that the other service will call with an HTTP client.
By doing so, you are free to change the implementation on each side (let's say you discover that you better write your service A in JavaScript and the service B in Java).
As long as both sides keep working with the same protocol, they are agnostic to the implementation that the other side uses.