-
Notifications
You must be signed in to change notification settings - Fork 8
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 custom domain support #108
Conversation
testing csharp uri codeusing System;
using System.Collections.Generic;
using System.Net.Http;
using System.Web;
public class Program
{
public static void Main()
{
string longurl = "http://somesite.example/news.php?article=1&lang=en";
var uriBuilder = new UriBuilder(longurl);
var query = HttpUtility.ParseQueryString(uriBuilder.Query);
query["action"] = "🤣";
query["attempts"] = "11";
query["attempts"] = "12";
query.Add("attempts", "15");
query.Add("🤣", "15");
Console.WriteLine(query.ToString());
uriBuilder.Query = query.ToString();
longurl = uriBuilder.ToString();
Console.WriteLine(longurl);
var queryParams = new List<KeyValuePair<string?, string?>>();
var content = new FormUrlEncodedContent(queryParams);
Console.WriteLine(content.ReadAsStringAsync().Result);
var req = new HttpRequestMessage(HttpMethod.Get, "/riot/account/v1/active-shards/by-game/by-puuid?hello=world");
Console.WriteLine(req.ToString());
Console.WriteLine(req.RequestUri.ToString());
Uri uri = new Uri(req.RequestUri.ToString(), UriKind.RelativeOrAbsolute);
Console.WriteLine(uri.ToString());
var builder = new UriBuilder(uri);
Console.WriteLine(builder.ToString());
}
} |
@@ -1,7 +1,7 @@ | |||
<Project Sdk="Microsoft.NET.Sdk"> | |||
<Import Project="..\common.csproj.xml" /> | |||
<PropertyGroup> | |||
<TargetFrameworks>netstandard1.1;net45;net461;netstandard2.1;netcoreapp3.1;net6.0;net7.0</TargetFrameworks> | |||
<TargetFrameworks>net45;net461;netstandard2.1;netcoreapp3.1;net6.0;net7.0</TargetFrameworks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe you could also remove the netcoreapp3.1
(End of support: December 13, 2022) and net7.0
(End of support: May 14, 2024) and add net8.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aight sounds good (does adding net8.0 do anything if everything else stays the same?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I'll do this in a separate commit
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aight sounds good (does adding net8.0 do anything if everything else stays the same?)
adding net8.0 won't change anything but I think it's a good idea to include the latest LTS version of .NET
Squashed commits: - Fix example code in readme - Add example for a custom API domain - Remove unused config variable "apiRegionAsSubdomain" - Removed proxy documentation - Rename ApiURL variable to fit code style - Add support for region as a header parameter, and more specific URL building - Moved RegionConfig to Camille.RiotGames.Enums, and changed its values casing - Remove generated license callout - Correct variable in apiUrl description - Clarify apiUrl description - Move RegionHeaderKey to instead be RegionKey, and use it for the query parameter - Use the new RegionKey variable - Do not branch off of the URL contents - Use RegionKey to build the URL without string checking - Change naming region->route - Simplify query param editing code (.NET is a mess)
Squashed commits: - Fix example code in readme - Add example for a custom API domain - Remove unused config variable "apiRegionAsSubdomain" - Removed proxy documentation - Rename ApiURL variable to fit code style - Add support for region as a header parameter, and more specific URL building - Moved RegionConfig to Camille.RiotGames.Enums, and changed its values casing - Remove generated license callout - Correct variable in apiUrl description - Clarify apiUrl description - Move RegionHeaderKey to instead be RegionKey, and use it for the query parameter - Use the new RegionKey variable - Do not branch off of the URL contents - Use RegionKey to build the URL without string checking - Change naming region->route - Simplify query param editing code (.NET is a mess)
From #103