public async static Task <string> ShortenUrl(ShortRequest request, string shorteningUrl) { var shortenedReturn = await HttpService.Post <ShortRequest>(shorteningUrl, request); var shortResponseJson = await shortenedReturn.Content.ReadAsStringAsync(); var theShortUrl = ShortResponse.FromJson(shortResponseJson); return(theShortUrl.FirstOrDefault()?.ShortUrl); }
public static string ToJson(this ShortRequest self) => JsonConvert.SerializeObject(self, Converter.Settings);