Asp.Net Web API : Call Back Handler

Soni Samuel Panackacheril 66 Reputation points
2021-01-15T03:06:57.043+00:00

Hi,

I am looking on how to implement a CallBack Handler to a Web API Controller. I basically need to process the response send back by my external client.

I basically want to call the WebAPI controller from my portal so that I can place/initiate a Request to my external client. Once this client does the required actions at their end, they will need to send a CallBack so that I can process the response.

Appreciate a feedback on the above.

Regards
SSP

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,015 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
343 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Soni Samuel Panackacheril 66 Reputation points
    2021-01-20T05:02:17.017+00:00

    Hi @Yihui Sun-MSFT ,

    In your opinion, which would be a best approach Func<...>, Action<...>, or Expression<...>?

    Appreciate if you can point to me to an example to have an idea.

    Regards,


  2. Soni Samuel Panackacheril 66 Reputation points
    2021-01-20T10:29:55.727+00:00

    Hi @Yihui Sun-MSFT ,

    Thanks for getting back. Yes you are correct we are using Web API (Client B) as the Service Layer. However the Call from A (Web Portal) to B is through client side ($.Ajax).

    The External Client (C) is a public enitity which we are integrating with through their SDK i.e. Call from B to C is from the WebAPI through the external client's SDK. So we are not using HttpClient to send request between Client B & Client C.

    So the whole idea is for the Client C to have a Callback to Client B (Web API) in order to provide with the Response once they are done.

    Thanks.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.