Skip to content

Commit

Permalink
Add Configuration.Enable_AutoRewriteRemoveFragment()
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelEstevamReis committed Aug 3, 2020
1 parent c72d2ea commit 8d5394a
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
11 changes: 10 additions & 1 deletion Simple.Lib/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,19 @@ public class Configuration

#region Scheduler
/// <summary>
/// Enable auto rewrite of Uri to remove Frament
/// Enable auto rewrite of Uri to remove Fragment
/// </summary>
public bool Auto_RewriteRemoveFragment { get; set; } = false;

/// <summary>
/// Enables automatic UriRewrite to remove fragments
/// </summary>
public Configuration Enable_AutoRewriteRemoveFragment()
{
Auto_RewriteRemoveFragment = true;
return this; // Chaining
}

#endregion

#region Cache Stuff
Expand Down
10 changes: 10 additions & 0 deletions Simple.Lib/Downloaders/HttpClientDownloader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,5 +181,15 @@ private static void mergeHeaders(HttpRequestMessage req, HeaderCollection addReq
}
}
}

/// <summary>
/// Creates a new instance of HttpClientDownloader with Extensions.RequestHeaderExtension.AddBaseRequestHeaders
/// </summary>
public static HttpClientDownloader BuildDownloaderWithDefaulGenerictHeadders()
{
var http = new HttpClientDownloader();
Extensions.RequestHeaderExtension.AddBaseRequestHeaders(http.IncludeRequestHeaders);
return http;
}
}
}
12 changes: 11 additions & 1 deletion Simple.Lib/Simple.Lib.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8d5394a

Please sign in to comment.