Skip to content

Commit 5a50525

Browse files
committed
feat(Core): switch default hastebin provider to pastie.io
1 parent 7a2db19 commit 5a50525

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎SnapX.Core/Upload/Text/Hastebin.cs‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,14 @@ public override UploadResult UploadText(string? text, string? fileName)
4242
{
4343
var ur = new UploadResult();
4444
if (string.IsNullOrEmpty(text)) return ur;
45-
var domain = !string.IsNullOrEmpty(CustomDomain) ? CustomDomain : "https://hastebin.com";
45+
var domain = !string.IsNullOrEmpty(CustomDomain) ? CustomDomain : "https://pastie.io";
4646

4747
ur.Response = SendRequest(HttpMethod.Post, URLHelpers.CombineURL(domain, "documents"), text);
4848
if (string.IsNullOrEmpty(ur.Response)) return ur;
4949
var options = new JsonSerializerOptions()
5050
{
51-
TypeInfoResolver = HastebinContext.Default
51+
TypeInfoResolver = HastebinContext.Default,
52+
PropertyNameCaseInsensitive = true
5253
};
5354
var response = JsonSerializer.Deserialize<HastebinResponse>(ur.Response, options);
5455
if (response == null || string.IsNullOrEmpty(response.Key)) return ur;

0 commit comments

Comments
 (0)