For reasons I won't get into here, we have 2 .NET Web APIs (A and B). A website sends JSON to A via jQuery's .ajax(), and then A needs to pass it on to B.
In A, I have a model as a parameter in the controller which gets mapped from the json. So:
Person: {
Surname: "Me",
FirstName: "Hello"
}
arrives at my controller method as:
submitInfo(Person thePerson)
How do I make a call from A to B using this model? Do I need to serialize it to json again and then send it to B to get re-mapped? How do I do that?
I read this article about how to call a REST api from .NET using query string parameters in the url, but I'm not sure how that works with my model or even when it's serialized to json...
My API controller methods are the same (since it's effectively the same functionality):
public IHttpActionResult submitInfo(Person thePerson)
{
}