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?