ServiceGateway sending GET method not found ANY / POST

I’m receiving a POST request in ServiceA.Post(CreateSomething input)

I’m using ServiceGateway to call ServiceB.Get(GetInfo input)

When I do this, I get an error because ServiceB has no method Post or Any.

Only way I found to fix this was to change ServiceB.Get(GetInfo input) to ServiceB.Any(GetInfo input).

But I don’t like this, I think it’s polluting the service declarations. I’d like to be able to call ServiceB.Get(GetInfo) from the ServiceGateway. From what I can understand,

class ServiceA : Service {
   public async Task<object> Post(CreateSomething input){
     Gateway.SendAsync(new GetInfo()); // This uses Gateway.SendAsync(new GetInfo(), Request)
   }
}

Since Request has a POST header on it, it’s forwarded as is to ServiceB which can’t find a Post(GetInfo…)

Is there some way to either create a new request (with GET) from the current existing POST request?

By default the Service Gateway calls your Service via Post() so your Service needs to allow Post() or Any() otherwise your Request DTO needs to implement the IVerb marker interface you want it called as, e.g. IGet.

Okay, thanks a lot I will try this

I see that there are IVerb and IVerb. What’s the difference?

There is only 1 IVerb interface and it’s an intert marker interface that all other IVerb marker interfaces inherit.