private void EncodeTest(ParamRequest urlPath) { byte[] toEncodeAsBytes = System.Text.ASCIIEncoding.ASCII.GetBytes(urlPath.UrlPath); string returnValue = System.Convert.ToBase64String(toEncodeAsBytes); Console.WriteLine(returnValue); Console.WriteLine("---------------------------"); }
public string CutUrl([FromBody] ParamRequest urlPath) { EncodeTest(urlPath); var link = new ShortLink() { Url = urlPath.UrlPath, Id = urlPath.Id }; var urlChunk = link.GetUrlChunk(); return(urlChunk); // return urlPath; }