Skip to content

add one more method to be the same standard as httpclient so it can r…#8

Open
ratchapol-an wants to merge 2 commits intomasterfrom
more-generic
Open

add one more method to be the same standard as httpclient so it can r…#8
ratchapol-an wants to merge 2 commits intomasterfrom
more-generic

Conversation

@ratchapol-an
Copy link

@ratchapol-an ratchapol-an commented Dec 17, 2019

add one more method to be the same standard as httpclient so it can reuse more.

{
return await SendAsync(request.RequestUri.PathAndQuery, (url) =>
{
request.RequestUri = new Uri(url);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good trick for replacing URL, but it does not look straightforward. Please add unit test for that.

Additionally, please put this method into #if !NET462 block. HttpRequestMessage cannot be reused for netframework.

foreach (var ex in Exceptions)
{
sb.Append(string.Format("\r\n - \"{0}\" -> {1}", ex.Uri, ex.Message));
sb.Append(string.Format("\r\n - \"{0}\" -> {1}", ex.Message, ex.Uri));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure why you want to change this part, as it's mostly for backward compatibility (old internal component).

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.

2 participants