Add documentation to Microsoft.Extensions.Http#57719
Add documentation to Microsoft.Extensions.Http#57719CarnaViire merged 12 commits intodotnet:mainfrom
Conversation
- M:Microsoft.Extensions.Http.HttpMessageHandlerBuilder.CreateHandlerPipeline
(System.Net.Http.HttpMessageHandler,System.Collections.Generic.IEnumerable{System.Net.Http.DelegatingHandler})
- M:Microsoft.Extensions.Http.IHttpMessageHandlerBuilderFilter.Configure
(System.Action{Microsoft.Extensions.Http.HttpMessageHandlerBuilder})
- M:Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.#ctor(Microsoft.Extensions.Logging.ILogger)
- M:Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.#ctor
(Microsoft.Extensions.Logging.ILogger,Microsoft.Extensions.Http.HttpClientFactoryOptions)
- M:Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.SendAsync
(System.Net.Http.HttpRequestMessage,System.Threading.CancellationToken)
- M:Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.#ctor(Microsoft.Extensions.Logging.ILogger)
- M:Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.#ctor
(Microsoft.Extensions.Logging.ILogger,Microsoft.Extensions.Http.HttpClientFactoryOptions)
- M:Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync
(System.Net.Http.HttpRequestMessage,System.Threading.CancellationToken)
- T:Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler
- T:Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler
Fix dotnet#43916
|
Tagging subscribers to this area: @dotnet/ncl Issue DetailsItems Addressed:
Items not addressed:
Fix #43916
|
|
@carlossanlop Apologies I failed to add you to this as requested. |
|
@resistr thanks a lot for your PR! I updated top post and changed "Fixes" to "Contributes to" as it does not address all items in the issue linked. I also deleted the list of APIs which are not covered by this PR from the top post. Hopefully I didn't mess up things. |
src/libraries/Microsoft.Extensions.Http/src/Logging/LoggingHttpMessageHandler.cs
Outdated
Show resolved
Hide resolved
…pMessageHandler.cs Co-authored-by: Martin Vseticka <203266+MartyIX@users.noreply.github.com>
CarnaViire
left a comment
There was a problem hiding this comment.
Thanks for the contribution! I left some comments on what I believe will be more accurate to say.
| public abstract HttpMessageHandler Build(); | ||
|
|
||
| /// <summary> | ||
| /// Creates an instance of an <see cref="HttpMessageHandler"/> using the <see cref="DelegatingHandler"/> instances |
There was a problem hiding this comment.
As it doesn't create a new instance, but only links existing ones, I believe it should say something like
Constructs an instance of <see cref="HttpMessageHandler"/> by chaining <paramref name="additionalHandlers"/> one after another with <paramref name="primaryHandler"/> in the end of the chain.
(let's also leave the types of params, e.g. the fact it's DelegatingHandler to <param> part of docs)
There was a problem hiding this comment.
I've made the recommended changes and thanks for the feedback.
@resistr
|
|
||
| /// <summary> | ||
| /// Creates an instance of an <see cref="HttpMessageHandler"/> using the <see cref="DelegatingHandler"/> instances | ||
| /// provided by <paramref name="additionalHandlers"/>. The resulting pipeline can be used to manually create <see cref="HttpClient"/> |
There was a problem hiding this comment.
I don't think this method is supposed/expected to be used outside of HttpClientFactory infrastructure, especially with it being protected, so I don't think "manual creating" applies here... I'd say it's more like
The resulting pipeline is used by <see cref="IHttpClientFactory"/> infrastructure to create <see cref="HttpClient"/> instances with customized message handlers. The resulting pipeline can also be accessed by using <see cref="IHttpMessageHandlerFactory"/> instead of <see cref="IHttpClientFactory"/>.
There was a problem hiding this comment.
Surry for all of the noise in this section; I had borrowed the text from https://github.com/aspnet/AspNetWebStack/blob/master/src/System.Net.Http.Formatting/HttpClientFactory.cs#L58 referenced in the method.
I've made the recommended changes and thanks for the feedback.
src/libraries/Microsoft.Extensions.Http/src/HttpMessageHandlerBuilder.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Http/src/HttpMessageHandlerBuilder.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Http/src/Logging/LoggingScopeHttpMessageHandler.cs
Outdated
Show resolved
Hide resolved
…peHttpMessageHandler.cs Co-authored-by: Natalia Kondratyeva <knatalia@microsoft.com>
…Builder.cs Co-authored-by: Natalia Kondratyeva <knatalia@microsoft.com>
…Builder.cs Co-authored-by: Natalia Kondratyeva <knatalia@microsoft.com>
Reworded the cstor documentation on HttpMessageHandlerBuilder based on feedback from active PR. Contributes to dotnet#43916
|
@carlossanlop adding you as a reviewer as you requested in #43916 |
src/libraries/Microsoft.Extensions.Http/src/Logging/LoggingScopeHttpMessageHandler.cs
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Http/src/Logging/LoggingScopeHttpMessageHandler.cs
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Http/src/Logging/LoggingScopeHttpMessageHandler.cs
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Http/src/Logging/LoggingHttpMessageHandler.cs
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Http/src/Logging/LoggingHttpMessageHandler.cs
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Http/src/Logging/LoggingHttpMessageHandler.cs
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Http/src/HttpMessageHandlerBuilder.cs
Show resolved
Hide resolved
…Builder.cs Co-authored-by: Carlos Sanchez <1175054+carlossanlop@users.noreply.github.com>
…pMessageHandler.cs Co-authored-by: Carlos Sanchez <1175054+carlossanlop@users.noreply.github.com>
…pMessageHandler.cs Co-authored-by: Carlos Sanchez <1175054+carlossanlop@users.noreply.github.com>
…peHttpMessageHandler.cs Co-authored-by: Carlos Sanchez <1175054+carlossanlop@users.noreply.github.com>
…peHttpMessageHandler.cs Co-authored-by: Carlos Sanchez <1175054+carlossanlop@users.noreply.github.com>
Augment documentation for SendAsync in LoggingScopeHttpMessageHandler and LoggingHttpMessageHandler Contributes to dotnet#43916
|
@carlossanlop could you pls check out replies to your comments and let us know your thoughts? |
carlossanlop
left a comment
There was a problem hiding this comment.
LGTM. Thank you so much for your contribution, @resistr!
Items Addressed:
(System.Net.Http.HttpMessageHandler,System.Collections.Generic.IEnumerable{System.Net.Http.DelegatingHandler})
(System.Action{Microsoft.Extensions.Http.HttpMessageHandlerBuilder})
Microsoft.Extensions.Http.Logging:
(Microsoft.Extensions.Logging.ILogger,Microsoft.Extensions.Http.HttpClientFactoryOptions)
(System.Net.Http.HttpRequestMessage,System.Threading.CancellationToken)
(Microsoft.Extensions.Logging.ILogger,Microsoft.Extensions.Http.HttpClientFactoryOptions)
(System.Net.Http.HttpRequestMessage,System.Threading.CancellationToken)
Contributes to #43916