I have a webhook working in Acumatica. I want to be able to return, to the caller, some JSon of the transaction that they created instead of just status 200.
public async Task<System.Web.Http.IHttpActionResult> ProcessRequestAsync(HttpRequestMessage request, CancellationToken cancellationToken)
{
try
{
//do some things
}
catch (Exception ex)
{
var failed = new ExceptionResult(ex, true, new DefaultContentNegotiator(), request, new[] { new JsonMediaTypeFormatter() });
return failed;
}
//This is where I’m stuck. I’d be happy to return some JSon, similar to what the API would return after a successful call
return ???
}
Intellisense is good at telling me what I can’t do, not really good at telling what I should do. :)