Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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.

None yet

2 participants