Skip to content

Conversation

@darrelmiller
Copy link
Member

@darrelmiller darrelmiller commented Dec 30, 2020

This ResponseHandler function will be called from the operation methods to process the HTTP response message. During construction of the request, the handler can be replaced with an alternative one. We should also consider the possibility of wanting to globally replace the default handler.

        public static Task<object> DefaultResponseHandler(HttpResponseMessage response) { return null; }
        public Func<HttpResponseMessage,Task<object>> ResponseHandler {get;set;}  = DefaultResponseHandler;

Once we have models in place, the object type in these signatures should be replaced by the model type for the request builder.

@darrelmiller darrelmiller requested a review from baywet as a code owner December 30, 2020 19:30
darrelmiller and others added 8 commits December 31, 2020 11:11
Co-authored-by: Vincent Biret <vibiret@microsoft.com>
Co-authored-by: Vincent Biret <vibiret@microsoft.com>
Co-authored-by: Vincent Biret <vibiret@microsoft.com>
Co-authored-by: Vincent Biret <vibiret@microsoft.com>
Co-authored-by: Vincent Biret <vibiret@microsoft.com>
Co-authored-by: Vincent Biret <vibiret@microsoft.com>
@darrelmiller darrelmiller requested a review from baywet December 31, 2020 18:28
@baywet baywet merged commit 97b8ddb into main Dec 31, 2020
@baywet baywet deleted the dm/responsehandler branch December 31, 2020 21:10
@baywet baywet added this to the MVP milestone Feb 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants