mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-30 01:07:21 +13:00
fixed #5420: Update Zero Width Shortener API to v2
This commit is contained in:
parent
5682c6ab6e
commit
887d8aea29
1 changed files with 5 additions and 3 deletions
|
@ -47,10 +47,12 @@ public override UploadResult ShortenURL(string url)
|
|||
{
|
||||
UploadResult result = new UploadResult { URL = url };
|
||||
|
||||
Dictionary<string, string> args = new Dictionary<string, string>();
|
||||
args.Add("url", url);
|
||||
string json = JsonConvert.SerializeObject(new
|
||||
{
|
||||
url = url
|
||||
});
|
||||
|
||||
string response = SendRequest(HttpMethod.GET, "https://us-central1-zero-width-shortener.cloudfunctions.net/shortenURL", args);
|
||||
string response = SendRequest(HttpMethod.POST, "https://api.zws.im", json, RequestHelpers.ContentTypeJSON);
|
||||
|
||||
if (!string.IsNullOrEmpty(response))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue