does anyone know how to pass a URL as a query string parameter and then get the URl in HttpGet method as a parameter ?
Thanks so much for all the answers. Finally I got it sorted. Please refer to my fix below:
[Route("api/[controller]")]
public class UrlController : Controller
{
[HttpGet("{*longUrl}")]
public string ShortUrl(string longUrl)
{
var test = longUrl + Request.QueryString;
return JsonConvert.SerializeObject(GetUrlToken(test));
}
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments